From b905869a35f062a4e5072f10bec3a2ba3db0e365 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Wed, 30 Jul 2025 14:32:01 -0400 Subject: working userland with some invoke syscalls --- include/string.h | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 include/string.h (limited to 'include/string.h') diff --git a/include/string.h b/include/string.h new file mode 100644 index 0000000..a821f1c --- /dev/null +++ b/include/string.h @@ -0,0 +1,25 @@ +#ifndef _JOVE_STRING_H +#define _JOVE_STRING_H 1 + +#include +#include + +/**@FUNC Writes the given integer to the string using a custom base. + * If the integer is larger than size, s will stop being written to at s[size-1]. + * Returns the number of characters written, or would have been written. + * @PARAM s buffer to write to. + * @PARAM size size of buffer to write to. + * @PARAM l integer to write. + * @PARAM sign whether the integer is signed or unsigned. + * @PARAM radix base to write at. + * @RETURN number of characters in number.*/ +int ltostr(char *s, int size, unsigned long l, bool sign, int radix); + +size_t strlen(const char *s); +int strcmp(const char *s1, const char *s2); + +void *memset(void *dest, char c, size_t n); +void *memcpy(void *dest, const void *src, size_t n); +void *memmove(void *dest, const void *src, size_t n); + +#endif -- cgit v1.2.1