1 /* 2 * Copyright (c) 2006-2022, RT-Thread Development Team 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Change Logs: 7 * Date Author Notes 8 * 2022-01-12 Meco Man The first version. 9 */ 10 11 #ifndef __POSIX_STRING_H__ 12 #define __POSIX_STRING_H__ 13 14 #ifdef __cplusplus 15 extern "C" { 16 #endif 17 18 #include <stddef.h> 19 #include <string.h> 20 21 void bzero(void * s, size_t n); 22 void bcopy(const void * src, void * dest, size_t n); 23 int bcmp(const void * s1, const void * s2, size_t n); 24 void explicit_bzero(void * s, size_t n); 25 char *index(const char * s, int c); 26 char *rindex(const char * s, int c); 27 int ffs(int i); 28 int ffsl(long i); 29 int ffsll(long long i); 30 void *memrchr(const void* ptr, int ch, size_t pos); 31 size_t strnlen(const char *s, size_t maxlen); 32 char* strchrnul(const char *s, int c); 33 int strcasecmp(const char * s1, const char * s2); 34 int strncasecmp(const char * s1, const char * s2, size_t n); 35 char *strdup(const char *s); 36 char *strndup(const char *s, size_t size); 37 char *strtok_r(char *str, const char *delim, char **saveptr); 38 39 #ifdef __cplusplus 40 } 41 #endif 42 43 #endif /* __POSIX_STRING_H__ */ 44