xref: /csrg-svn/lib/libc/string/strlen.c (revision 61193)
142165Sbostic /*-
2*61193Sbostic  * Copyright (c) 1990, 1993
3*61193Sbostic  *	The Regents of the University of California.  All rights reserved.
435092Sbostic  *
542165Sbostic  * %sccs.include.redist.c%
61986Swnj  */
71986Swnj 
835092Sbostic #if defined(LIBC_SCCS) && !defined(lint)
9*61193Sbostic static char sccsid[] = "@(#)strlen.c	8.1 (Berkeley) 06/04/93";
1035092Sbostic #endif /* LIBC_SCCS and not lint */
1135092Sbostic 
1246144Sbostic #include <sys/cdefs.h>
1342165Sbostic #include <string.h>
1442165Sbostic 
1542165Sbostic size_t
strlen(str)1635092Sbostic strlen(str)
1742165Sbostic 	const char *str;
181986Swnj {
1942165Sbostic 	register const char *s;
201986Swnj 
2142165Sbostic 	for (s = str; *s; ++s);
2242165Sbostic 	return(s - str);
231986Swnj }
2442165Sbostic 
25