diff options
author | Danny Holman <dholman@gymli.org> | 2024-02-24 14:47:25 -0600 |
---|---|---|
committer | Danny Holman <dholman@gymli.org> | 2024-02-24 14:55:51 -0600 |
commit | 891f1010bbdc1351bda8d2a6139094a14bdfd5e1 (patch) | |
tree | f8fcc9a273ca8df783aee243fcb3aa545887633c /include/kernel | |
parent | 2ce0f8af51dae9e7d591ff5fd038f89d6ca9dbbe (diff) |
kernel: string: add a strcpy function
Add an implmentation of strcpy. This function is used in several places
in the kernel to copy strings between memory addresses.
Signed-off-by: Danny Holman <dholman@gymli.org>
Diffstat (limited to 'include/kernel')
-rw-r--r-- | include/kernel/string.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kernel/string.h b/include/kernel/string.h index f9a8eed..76bf610 100644 --- a/include/kernel/string.h +++ b/include/kernel/string.h @@ -10,6 +10,7 @@ void* memset(void *str, int c, size_t n); int strncmp(const char *str1, const char *str2, size_t n); int strcmp(const char *str1, const char *str2); size_t strlen(const char *str); +char* strncpy(char* __restrict dest, const char* __restrict src, size_t n); char* strcpy(char* __restrict dest, const char* __restrict src); char* strcat(char* __restrict dest, const char* __restrict src); char* strtok(char* __restrict str, const char* __restrict delim); |