summaryrefslogtreecommitdiffstats
path: root/lib/strlen.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/strlen.c')
-rw-r--r--lib/strlen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/strlen.c b/lib/strlen.c
new file mode 100644
index 0000000..da34697
--- /dev/null
+++ b/lib/strlen.c
@@ -0,0 +1,9 @@
+#include "string.h"
+
+size_t
+strlen(const char *s)
+{
+ size_t l = 0;
+ for(; s[l]; l++);
+ return l;
+}