From edec290bea5e657a1abdb42aca40440306d11ddc Mon Sep 17 00:00:00 2001 From: sbosse Date: Thu, 17 Oct 2024 23:43:21 +0200 Subject: [PATCH] Thu 17 Oct 23:42:52 CEST 2024 --- include/library/string.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/library/string.h diff --git a/include/library/string.h b/include/library/string.h new file mode 100644 index 0000000..f7a7e9a --- /dev/null +++ b/include/library/string.h @@ -0,0 +1,34 @@ +/* +Copyright (C) 2015-2019 The University of Notre Dame +This software is distributed under the GNU General Public License. +See the file LICENSE for details. +*/ + +#ifndef STRING_H +#define STRING_H + +#include "kernel/types.h" + +void strcpy(char *d, const char *s); +void strncpy(char *d, const char *s, unsigned length); +char * strdup(const char *s); +int strcmp(const char *a, const char *b); +int strncmp(const char *a, const char *b, unsigned length); +char *strdup(const char *s); +unsigned strlen(const char *s); +char *strcat(char *d, const char *s); +char *uint_to_string(uint32_t u, char *str); +char *strrev(char *s); + +char *strtok(char *s, const char *delim); + +int str2int(const char *s, int *d); + +const char *strchr(const char *s, char ch); + +void memset(void *d, char value, unsigned length); +void memcpy(void *d, const void *s, unsigned length); + +void printf(const char *s, ...); + +#endif