From 2067ca185220348b70b35c96e175dfb87cc05592 Mon Sep 17 00:00:00 2001 From: Ada Christine Date: Sun, 6 Feb 2022 16:31:19 +0000 Subject: we have kprintf() --- lib/string.c | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/string.c (limited to 'lib') diff --git a/lib/string.c b/lib/string.c new file mode 100644 index 0000000..968467e --- /dev/null +++ b/lib/string.c @@ -0,0 +1,11 @@ +#include + +size_t strlen(const char *s) +{ + size_t l = 0; + + while (*s++) l++; + + return l; +} + -- cgit v1.3.1-1-g115d