X-Git-Url: http://git.buserror.net/cgi-bin/gitweb.cgi?p=polintos%2Fscott%2Fpriv.git;a=blobdiff_plain;f=include%2Fc%2Fstd%2Fstring.h;h=55261598682edaab7723d28170600185347d8657;hp=e457ed59081462f325115a095cc452e778549eee;hb=28d0cc04e24ba27bfcfa1aabae10b5d409f05a14;hpb=92222712a7b6e2a83646724bfb1f1ccf38abff63 diff --git a/include/c/std/string.h b/include/c/std/string.h index e457ed5..5526159 100644 --- a/include/c/std/string.h +++ b/include/c/std/string.h @@ -7,13 +7,29 @@ extern "C" { #endif -void *memcpy(void *dest, const void *src, size_t len); -void *memset(void *block, int count, size_t len); -int memcmp(const void *b1, const void *b2, size_t len); -size_t strlen(const char *s); + void *memcpy(void *dest, const void *src, size_t len); + void *memmove(void *dest, const void *src, size_t len); + int memcmp(const void *b1, const void *b2, size_t len); + void *memset(void *block, int count, size_t len); + size_t strnlen(const char *s, size_t n); + size_t strlen(const char *s); + char *strcpy(char *dest, const char *src); + char *strncpy(char *dest, const char *src, size_t len); + char *strcat(char *dest, const char *src); + char *strncat(char *dest, const char *src, size_t len); + int strcmp(const char *s1, const char *s2); + int strncmp(const char *s1, const char *s2, int n); #ifdef __cplusplus + char *strchr(char *s, int c); } + +static inline const char *strchr(const char *s, int c) +{ + return const_cast(strchr(const_cast(s), c)); +} +#else +char *strchr(const char *s, int c); #endif #endif