diff options
Diffstat (limited to 'src/mlibc/string/strlen.c')
-rw-r--r-- | src/mlibc/string/strlen.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mlibc/string/strlen.c b/src/mlibc/string/strlen.c new file mode 100644 index 0000000..1143683 --- /dev/null +++ b/src/mlibc/string/strlen.c @@ -0,0 +1,7 @@ +#include <mlibc/string.h> + +size_t strlen(const char *str) { + size_t len = 0; + while (str[len]) len++; + return len; +}
\ No newline at end of file |