k-tana-zero/libs/libc/strlen.c

13 lines
132 B
C
Raw 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);
}