string.h (1541B)
1 #ifndef _STRING_H 2 #define _STRING_H 3 4 #include <stddef.h> 5 6 // Simple string functions 7 char *strcat(char *s, const char *append); 8 char *strchr(const char *p, int ch); 9 int strcmp(const char *s1, const char *s2); 10 char *strcpy(char *to, const char *from); 11 size_t strcspn(const char *s1, const char *s2); 12 char *strdup(const char *str); 13 size_t strlen(const char *str); 14 char *strncat(char *dst, const char *src, size_t n); 15 int strncmp(const char *s1, const char *s2, size_t n); 16 char *strncpy(char *dst, const char *src, size_t n); 17 char *strpbrk(const char *s1, const char *s2); 18 char *strrchr(const char *p, int ch); 19 size_t strspn(const char *s1, const char *s2); 20 char *strstr(const char *s, const char *find); 21 char *strtok(char *s, const char *delim); 22 char *strtok_r(char *s, const char *delim, char **last); 23 24 // Simple memory functions 25 void *memcpy(void *dst, const void *src, size_t size); 26 void *memmove(void *dst, const void *src, size_t size); 27 void *memccpy(void *t, const void *f, int c, size_t n); 28 int memcmp(const void *s1, const void *s2, size_t n); 29 void *memset(void *dst, int ch, size_t size); 30 void *memchr(const void *s, int c, size_t n); 31 32 // Error strings 33 char *strerror(int); 34 extern const char *const sys_errlist[]; 35 extern const int sys_nerr; 36 37 // Locale-sensitive string functions 38 int strcoll(const char *s1, const char *s2); 39 size_t strxfrm(char *__restrict s1, const char *__restrict s2, size_t n); 40 41 size_t strlcpy(char *dst, const char *src, size_t size); 42 size_t strlcat(char *dst, const char *src, size_t size); 43 44 #endif // _STRING_H