hc
2024-03-22 619f0f87159c5dbd2755b1b0a0eb35784be84e7a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/*
 * SPDX-License-Identifier: BSD-2-Clause
 *
 * Copyright (c) 2019 Western Digital Corporation or its affiliates.
 *
 * Authors:
 *   Atish Patra <atish.patra@wdc.com>
 */
 
#ifndef __STRING_H__
#define __STRING_H__
 
#include <sbi/sbi_types.h>
 
/*
  Provides sbi_strcmp for the completeness of supporting string functions.
  it is not recommended to use sbi_strcmp() but use sbi_strncmp instead.
*/
 
int sbi_strcmp(const char *a, const char *b);
 
int sbi_strncmp(const char *a, const char *b, size_t count);
 
size_t sbi_strlen(const char *str);
 
size_t sbi_strnlen(const char *str, size_t count);
 
char *sbi_strcpy(char *dest, const char *src);
 
char *sbi_strncpy(char *dest, const char *src, size_t count);
 
char *sbi_strchr(const char *s, int c);
 
char *sbi_strrchr(const char *s, int c);
 
void *sbi_memset(void *s, int c, size_t count);
 
void *sbi_memcpy(void *dest, const void *src, size_t count);
 
void *sbi_memmove(void *dest, const void *src, size_t count);
 
int sbi_memcmp(const void *s1, const void *s2, size_t count);
 
void *sbi_memchr(const void *s, int c, size_t count);
 
#endif