From d1a48fa371378ff7cc5833958a6f453ee46c4488 Mon Sep 17 00:00:00 2001 From: Carlos Maiolino Date: Sat, 28 Feb 2026 13:37:40 +0100 Subject: Add strnlen helper Signed-off-by: Carlos Maiolino --- src/include/toxic/string.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/include/toxic') diff --git a/src/include/toxic/string.h b/src/include/toxic/string.h index 3cb4a30..b43942b 100644 --- a/src/include/toxic/string.h +++ b/src/include/toxic/string.h @@ -2,6 +2,7 @@ #define STRING_H #include +#include #define NULL ((void *)0) @@ -9,6 +10,7 @@ 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); +int strncmp(const char *s1, const char *s2, size_t n); void *memset(void *s, int c, size_t n); #endif /* STRING_H */ -- cgit v1.2.3