X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=rpikern;a=blobdiff_plain;f=src%2Flibc%2Fstring.h;h=09f7020a83d6b6fda0c87d2ddd974a72e8284af6;hp=4a1812fa37bacf03efbc67d1e5e7cc81a71d29e5;hb=32ccc707bc0821d7ff4248fe9f58e92e9c6ebef9;hpb=203b43a75a028e9238307bd6e73768eb8e942071 diff --git a/src/libc/string.h b/src/libc/string.h index 4a1812f..09f7020 100644 --- a/src/libc/string.h +++ b/src/libc/string.h @@ -1,9 +1,34 @@ -#ifndef LIBC_STRING_H_ -#define LIBC_STRING_H_ +#ifndef STRING_H_ +#define STRING_H_ -void *memset(void *ptr, int val, int size); -void *memcpy(void *dest, void *src, int size); +#include -int strcmp(const char *a, const char *b); +void *memset(void *s, int c, size_t n); -#endif /* LIBC_STRING_H_ */ +void *memcpy(void *dest, const void *src, size_t n); +void *memmove(void *dest, const void *src, size_t n); + +int memcmp(void *aptr, void *bptr, size_t n); + +size_t strlen(const char *s); + +char *strchr(const char *s, int c); +char *strrchr(const char *s, int c); + +char *strstr(const char *str, const char *substr); +char *strcasestr(const char *str, const char *substr); + +int strcmp(const char *s1, const char *s2); +int strcasecmp(const char *s1, const char *s2); + +int strncmp(const char *s1, const char *s2, int n); +int strncasecmp(const char *s1, const char *s2, int n); + +char *strcpy(char *dest, const char *src); +char *strcat(char *dest, const char *src); + +char *strncpy(char *dest, const char *src, int n); + +char *strerror(int err); + +#endif /* STRING_H_ */