diff options
| author | Carlos Maiolino <[email protected]> | 2026-02-28 13:37:40 +0100 |
|---|---|---|
| committer | Carlos Maiolino <[email protected]> | 2026-02-28 13:37:40 +0100 |
| commit | d1a48fa371378ff7cc5833958a6f453ee46c4488 (patch) | |
| tree | 033c5949721e7a0ccb387eaf28f9cfee88190c37 /src/include/toxic/string.h | |
| parent | 7b3f6a5a507a59b613998ef9ad2f14252d993d42 (diff) | |
Add strnlen helper
Signed-off-by: Carlos Maiolino <[email protected]>
Diffstat (limited to 'src/include/toxic/string.h')
| -rw-r--r-- | src/include/toxic/string.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 <stddef.h> +#include <stdbool.h> #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 */ |
