initial check-in, version 0.5.0
[musl] / include / string.h
1 #ifndef _STRING_H
2 #define _STRING_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #undef NULL
9 #ifdef __cplusplus
10 #define NULL 0
11 #else
12 #define NULL ((void*)0)
13 #endif
14
15 #define __NEED_size_t
16 #include <bits/alltypes.h>
17
18 void *memcpy (void *, const void *, size_t);
19 void *memmove (void *, const void *, size_t);
20 void *memccpy (void *, const void *, int, size_t);
21 void *memset (void *, int, size_t);
22 int memcmp (const void *, const void *, size_t);
23 void *memchr (const void *, int, size_t);
24
25 char *strcpy (char *, const char *);
26 char *strncpy (char *, const char *, size_t);
27
28 char *strcat (char *, const char *);
29 char *strncat (char *, const char *, size_t);
30
31 int strcmp (const char *, const char *);
32 int strncmp (const char *, const char *, size_t);
33
34 int strcoll (const char *, const char *);
35 size_t strxfrm (char *, const char *, size_t);
36
37 char *strdup (const char *);
38
39 char *strchr (const char *, int);
40 char *strrchr (const char *, int);
41
42 size_t strcspn (const char *, const char *);
43 size_t strspn (const char *, const char *);
44 char *strpbrk (const char *, const char *);
45 char *strstr (const char *, const char *);
46
47 char *strtok (char *, const char *);
48 char *strtok_r (char *, const char *, char **);
49
50 size_t strlen (const char *);
51
52 char *strerror (int);
53 int strerror_r (int, char *, size_t);
54
55 size_t strlcat (char *, const char *, size_t);
56 size_t strlcpy (char *, const char *, size_t);
57
58 char *stpcpy(char *, const char *);
59 char *stpncpy(char *, const char *, size_t);
60 size_t strnlen (const char *, size_t);
61
62 #ifdef _GNU_SOURCE
63 int strcasecmp (const char *, const char *);
64 int strncasecmp (const char *, const char *, size_t);
65 char *strchrnul(const char *, int);
66 #endif
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif