1 /* string.h */
2 
3 /*
4  * Copyright (c) 2014 Wind River Systems, Inc.
5  *
6  * SPDX-License-Identifier: Apache-2.0
7  */
8 
9 #ifndef ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
10 #define ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_
11 
12 #include <stddef.h>
13 #include <zephyr/toolchain.h>
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 extern char  *strcpy(char *ZRESTRICT d, const char *ZRESTRICT s);
20 extern char  *strerror(int errnum);
21 extern int   strerror_r(int errnum, char *strerrbuf, size_t buflen);
22 extern char  *strncpy(char *ZRESTRICT d, const char *ZRESTRICT s,
23 		      size_t n);
24 extern char  *strchr(const char *s, int c);
25 extern char  *strrchr(const char *s, int c);
26 extern size_t strlen(const char *s);
27 extern size_t strnlen(const char *s, size_t maxlen);
28 extern int    strcmp(const char *s1, const char *s2);
29 extern int    strncmp(const char *s1, const char *s2, size_t n);
30 extern char  *strtok_r(char *str, const char *sep, char **state);
31 extern char *strcat(char *ZRESTRICT dest,
32 		    const char *ZRESTRICT src);
33 extern char  *strncat(char *ZRESTRICT dest, const char *ZRESTRICT src,
34 		      size_t n);
35 extern char *strstr(const char *s, const char *find);
36 
37 extern size_t strspn(const char *s, const char *accept);
38 extern size_t strcspn(const char *s, const char *reject);
39 
40 extern int    memcmp(const void *m1, const void *m2, size_t n);
41 extern void  *memmove(void *d, const void *s, size_t n);
42 extern void  *memcpy(void *ZRESTRICT d, const void *ZRESTRICT s,
43 		     size_t n);
44 extern void  *memset(void *buf, int c, size_t n);
45 extern void  *memchr(const void *s, int c, size_t n);
46 
47 #ifdef __cplusplus
48 }
49 #endif
50 
51 #endif  /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_ */
52