]> git.buserror.net Git - polintos/scott/priv.git/blob - include/c/std/string.h
Random stuff.
[polintos/scott/priv.git] / include / c / std / string.h
1 #ifndef _C_STRING_H
2 #define _C_STRING_H
3
4 #include <stddef.h>
5
6 #ifdef __cplusplus
7 extern "C" {
8 #endif
9
10         void *memcpy(void *dest, const void *src, size_t len);
11         void *memmove(void *dest, const void *src, size_t len);
12         int memcmp(const void *b1, const void *b2, size_t len);
13         void *memset(void *block, int c, size_t len);
14         size_t strnlen(const char *s, size_t n);
15         size_t strlen(const char *s);
16         char *strcpy(char *dest, const char *src);
17         char *strncpy(char *dest, const char *src, size_t len);
18         char *strcat(char *dest, const char *src);
19         char *strncat(char *dest, const char *src, size_t len);
20         int strcmp(const char *s1, const char *s2);
21         int strncmp(const char *s1, const char *s2, size_t n);
22
23 #ifdef __cplusplus
24         char *strchr(char *s, int c);
25 }
26
27 static inline const char *strchr(const char *s, int c)
28 {
29         return const_cast<const char *>(strchr(const_cast<char *>(s), c));
30 }
31 #else
32 char *strchr(const char *s, int c);
33 #endif
34
35 #endif