summaryrefslogtreecommitdiff
path: root/src/lib/libc/include/string.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-09-26 22:54:12 -0400
committerIan Moffett <ian@osmora.org>2025-09-26 22:54:12 -0400
commitcb10d0bee9c62a096b1a3571d1d7e896e6864ecc (patch)
tree50dc1cabe858e33b4f521df8c187ae139ab8829e /src/lib/libc/include/string.h
parentb338e2a75550c035dabd04538fdc2843bce85870 (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.h9
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 */