P8000/WEGA/contrib/lcc/lib/libc/port/gen/strlen.c

16 lines
180 B
C

/*
* Returns the number of
* non-NULL bytes in string argument.
*/
int
strlen(s)
register char *s;
{
register char *s0 = s + 1;
while (*s++ != '\0')
;
return (s - s0);
}