1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include "config.h" #include <ctype.h> #include "genlib.h" #include "stddefs.h" /* strlen(): * Returns the number of * non-NULL bytes in string argument. */ int strlen(register char *s) { register char *s0 = s + 1; while(*s++ != '\0') ; return (s - s0); }