summaryrefslogtreecommitdiff
path: root/lib/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string.c')
-rw-r--r--lib/string.c11
1 files changed, 11 insertions, 0 deletions
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 <kc/lib.h>
+
+size_t strlen(const char *s)
+{
+ size_t l = 0;
+
+ while (*s++) l++;
+
+ return l;
+}
+