#ifndef _STRING_H
#define _STRING_H

#ifdef __cplusplus
extern "C" {
#endif

typedef unsigned long size_t;

#ifndef NULL
# define NULL ((void *)0)
#endif

void  *memcpy(void *dst, const void *src, size_t n);
void  *memmove(void *dst, const void *src, size_t n);
void  *memset(void *dst, int c, size_t n);
int    memcmp(const void *a, const void *b, size_t n);
void  *memchr(const void *s, int c, size_t n);

size_t strlen(const char *s);
size_t strnlen(const char *s, size_t maxlen);
char  *strcpy(char *dst, const char *src);
char  *strncpy(char *dst, const char *src, size_t n);
int    strcmp(const char *a, const char *b);
int    strncmp(const char *a, const char *b, size_t n);
int    strcasecmp(const char *a, const char *b);
int    strncasecmp(const char *a, const char *b, size_t n);
char  *strchr(const char *s, int c);
char  *strrchr(const char *s, int c);
char  *strstr(const char *haystack, const char *needle);
char  *strcat(char *dst, const char *src);
char  *strncat(char *dst, const char *src, size_t n);
char  *strdup (const char *s);
char  *strndup(const char *s, size_t maxlen);
void  *memccpy(void *dst, const void *src, int c, size_t n);
char  *stpcpy (char *dst, const char *src);
char  *stpncpy(char *dst, const char *src, size_t n);
char  *strpbrk(const char *s, const char *accept);
size_t strspn (const char *s, const char *accept);
size_t strcspn(const char *s, const char *reject);
char  *strtok (char *str, const char *delim);
char  *strtok_r(char *str, const char *delim, char **saveptr);

char  *strerror(int err);
int    strcoll(const char *a, const char *b);
size_t strxfrm(char *dst, const char *src, size_t n);

#ifdef __cplusplus
}
#endif

#endif
