diff options
author | Ian Moffett <ian@osmora.org> | 2025-09-26 22:54:12 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2025-09-26 22:54:12 -0400 |
commit | cb10d0bee9c62a096b1a3571d1d7e896e6864ecc (patch) | |
tree | 50dc1cabe858e33b4f521df8c187ae139ab8829e /src/lib/libc/include/string.h | |
parent | b338e2a75550c035dabd04538fdc2843bce85870 (diff) |
libc: string: Add POSIX strnlen()
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'src/lib/libc/include/string.h')
-rw-r--r-- | src/lib/libc/include/string.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/libc/include/string.h b/src/lib/libc/include/string.h index 83bb551..58a7caa 100644 --- a/src/lib/libc/include/string.h +++ b/src/lib/libc/include/string.h @@ -39,4 +39,13 @@ */ size_t strlen(const char *s); +/* + * Get the length of a string with a maximum + * length + * + * @s: String to check length of + * @maxlen: Max length of string to check + */ +size_t strnlen(const char *s, size_t maxlen); + #endif /* _STRING_H */ |