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 <bits/restrict.h> 14 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 18 19 extern char *strcpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s); 20 extern char *strncpy(char *_MLIBC_RESTRICT d, const char *_MLIBC_RESTRICT s, 21 size_t n); 22 extern char *strchr(const char *s, int c); 23 extern char *strrchr(const char *s, int c); 24 extern size_t strlen(const char *s); 25 extern size_t strnlen(const char *s, size_t maxlen); 26 extern int strcmp(const char *s1, const char *s2); 27 extern int strncmp(const char *s1, const char *s2, size_t n); 28 extern char *strtok_r(char *str, const char *sep, char **state); 29 extern char *strcat(char *_MLIBC_RESTRICT dest, 30 const char *_MLIBC_RESTRICT src); 31 extern char *strncat(char *_MLIBC_RESTRICT dest, const char *_MLIBC_RESTRICT src, 32 size_t n); 33 extern char *strstr(const char *s, const char *find); 34 35 extern size_t strspn(const char *s, const char *accept); 36 extern size_t strcspn(const char *s, const char *reject); 37 38 extern int memcmp(const void *m1, const void *m2, size_t n); 39 extern void *memmove(void *d, const void *s, size_t n); 40 extern void *memcpy(void *_MLIBC_RESTRICT d, const void *_MLIBC_RESTRICT s, 41 size_t n); 42 extern void *memset(void *buf, int c, size_t n); 43 extern void *memchr(const void *s, int c, size_t n); 44 45 #ifdef __cplusplus 46 } 47 #endif 48 49 #endif /* ZEPHYR_LIB_LIBC_MINIMAL_INCLUDE_STRING_H_ */ 50