summaryrefslogtreecommitdiff
path: root/lib/string/strnlen.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string/strnlen.c')
-rw-r--r--lib/string/strnlen.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/string/strnlen.c b/lib/string/strnlen.c
deleted file mode 100644
index 8931c52..0000000
--- a/lib/string/strnlen.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* SPDX-License-Identifier: MIT */
-/* Derived from musl libc (Copyright © 2005-2020 Rich Felker, et al.) */
-
-#include <string.h>
-
-size_t strnlen(const char *s, size_t n)
-{
- const char *p = memchr(s, 0, n);
- return p ? p-s : n;
-}