summaryrefslogtreecommitdiff
path: root/src/include/toxic/string.h
diff options
context:
space:
mode:
authorCarlos Maiolino <[email protected]>2026-02-28 12:48:48 +0100
committerCarlos Maiolino <[email protected]>2026-02-28 13:11:41 +0100
commit7b3f6a5a507a59b613998ef9ad2f14252d993d42 (patch)
treea9cf5c8a1ab84fbd55e38d75ed01d3f5efb4b3f6 /src/include/toxic/string.h
parent50905cb31b16d39a9e9e640b9e5978826a03f920 (diff)
add strnlen and isdigit helpers
This is missing and will come in handy for path parsing. Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'src/include/toxic/string.h')
-rw-r--r--src/include/toxic/string.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/toxic/string.h b/src/include/toxic/string.h
index 69d8bd2..3cb4a30 100644
--- a/src/include/toxic/string.h
+++ b/src/include/toxic/string.h
@@ -3,7 +3,11 @@
#include <stddef.h>
+#define NULL ((void *)0)
+
+bool isdigit(char c);
size_t strlen(const char *s);
+size_t strnlen(const char *s, size_t maxlen);
char *strcpy(char *restrict dst, const char *restrict src);
void *memset(void *s, int c, size_t n);