k-chow/libs/libc/strlen.c

13 lines
132 B
C
Raw Permalink Normal View History

#include <string.h>
#include <stddef.h>
size_t strlen(const char *s)
{
const char *p = s;
while (*p)
p++;
return (p - s);
}