/* * string.h — memory and string operations. * * All functions here are real, tiny, and freestanding: no libc, no * compiler builtins. They are the foundation everything else builds on. */ #ifndef _NULSL_STRING_H #define _NULSL_STRING_H #include #ifdef __cplusplus extern "C" { #endif size_t strlen(const char *s); int strcmp(const char *a, const char *b); int strncmp(const char *a, const char *b, size_t n); char *strcpy(char *dst, const char *src); char *strncpy(char *dst, const char *src, size_t n); void *memcpy(void *restrict dst, const void *restrict 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); #ifdef __cplusplus } #endif #endif /* _NULSL_STRING_H */