xref: /optee_os/lib/libutils/isoc/include/string.h (revision dc0f4ec2074a459f7bf6279e19dd3a68f86468f1)
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 
30 void *memchr(const void *buf, int c, size_t length);
31 
32 #endif /* STRING_H */
33