diff options
author | Danny Holman <dholman@gymli.xyz> | 2021-01-17 20:17:19 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.xyz> | 2021-01-17 20:17:19 -0600 |
commit | fc66cc519ed7ef53c4f98b573a2ae341c1e6abed (patch) | |
tree | 848c4f762ea0a65f68cd6f39fbcee08f3e8ec809 /kernel | |
parent | 5064ec05b2af9e17aa1753575bef457a284ad61d (diff) |
kernel: add string.h implementations
Add implementations for functions declared in string.h.
Signed-off-by: Danny Holman <dholman@gymli.xyz>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/string.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/string.c b/kernel/string.c new file mode 100644 index 0000000..3610909 --- /dev/null +++ b/kernel/string.c @@ -0,0 +1,24 @@ +#include <kernel/string.h> + +int memcmp(const void *str1, const void *str2, size_t n) { + return 0; +} + +void* memcpy(void* __restrict dest, const void* __restrict src, size_t n) { + return NULL; +} + +void* memmove(void* __restrict dest, const void* __restrict src, size_t n) { + return NULL; +} + +void* memset(void *str, int c, size_t n) { + return NULL; +} + +size_t strlen(const char *str) { + size_t i = 0; + while (str[i] != '\0') + i++; + return i; +} |