aboutsummaryrefslogtreecommitdiffstats
path: root/memory/strnlen.c
diff options
context:
space:
mode:
Diffstat (limited to 'memory/strnlen.c')
-rw-r--r--memory/strnlen.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/memory/strnlen.c b/memory/strnlen.c
new file mode 100644
index 0000000..29c6156
--- /dev/null
+++ b/memory/strnlen.c
@@ -0,0 +1,6 @@
+#include "memory.h"
+
+size_t strnlen(char const *string, size_t max_len)
+{
+ return memlchr(string, '\0', max_len);
+}