xref: /original-bsd/lib/libc/string/strlen.c (revision 0a83ae40)
1 #if defined(LIBC_SCCS) && !defined(lint)
2 static char sccsid[] = "@(#)strlen.c	5.2 (Berkeley) 03/09/86";
3 #endif LIBC_SCCS and not lint
4 
5 /*
6  * Returns the number of
7  * non-NULL bytes in string argument.
8  */
9 
10 strlen(s)
11 register char *s;
12 {
13 	register n;
14 
15 	n = 0;
16 	while (*s++)
17 		n++;
18 	return(n);
19 }
20