1 /* SPDX-License-Identifier: BSD-2-Clause */ 2 /* 3 * Copyright (c) 2014, STMicroelectronics International N.V. 4 */ 5 6 /* 7 * This file provides what C99 standard requires for <string.h> 8 * for some functions 9 */ 10 11 #ifndef __STRING_H 12 #define __STRING_H 13 14 #include <stddef.h> 15 #include <sys/cdefs.h> 16 17 void *memcpy(void *__restrict s1, const void *__restrict s2, size_t n); 18 void *memmove(void *s1, const void *s2, size_t n); 19 int memcmp(const void *s1, const void *s2, size_t n); 20 void *memset(void *s, int c, size_t n); 21 22 int strcmp(const char *s1, const char *s2); 23 int strncmp(const char *s1, const char *s2, size_t n); 24 size_t strlen(const char *s); 25 size_t strnlen(const char *s, size_t n); 26 char *strdup(const char *s); 27 char *strndup(const char *s, size_t n); 28 char *strchr(const char *s, int c); 29 char *strstr(const char *big, const char *little); 30 char *strcpy(char *dest, const char *src); 31 char *strncpy(char *dest, const char *src, size_t n); 32 char *strrchr(const char *s, int i); 33 char *strtok_r(char *str, const char *delim, char **saveptr); 34 35 void *memchr(const void *buf, int c, size_t length); 36 37 #endif /* __STRING_H */ 38