diff --git a/src/system/libroot/posix/string/strlen.c b/src/system/libroot/posix/string/strlen.c new file mode 100644 index 0000000000..08e0d9a037 --- /dev/null +++ b/src/system/libroot/posix/string/strlen.c @@ -0,0 +1,20 @@ +/* +** Copyright 2001, Travis Geiselbrecht. All rights reserved. +** Distributed under the terms of the NewOS License. +*/ + +#include +#include + + +size_t +strlen(char const *s) +{ + size_t i = 0; + + while (s[i]) { + i += 1; + } + + return i; +}