aboutsummaryrefslogtreecommitdiff
path: root/src/lib/string.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/string.c')
-rw-r--r--src/lib/string.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/string.c b/src/lib/string.c
new file mode 100644
index 0000000..1b7a2b8
--- /dev/null
+++ b/src/lib/string.c
@@ -0,0 +1,11 @@
+// MIT License, Copyright (c) 2020 Marvin Borner
+
+#include <def.h>
+
+u32 strlen(const char *str)
+{
+ u32 len = 0;
+ while (str[len])
+ len++;
+ return len;
+}