1*42165Sbostic /*- 2*42165Sbostic * Copyright (c) 1990 The Regents of the University of California. 335092Sbostic * All rights reserved. 435092Sbostic * 5*42165Sbostic * %sccs.include.redist.c% 61986Swnj */ 71986Swnj 835092Sbostic #if defined(LIBC_SCCS) && !defined(lint) 9*42165Sbostic static char sccsid[] = "@(#)strlen.c 5.4 (Berkeley) 05/17/90"; 1035092Sbostic #endif /* LIBC_SCCS and not lint */ 1135092Sbostic 12*42165Sbostic #include <sys/stdc.h> 13*42165Sbostic #include <string.h> 14*42165Sbostic 15*42165Sbostic size_t 1635092Sbostic strlen(str) 17*42165Sbostic const char *str; 181986Swnj { 19*42165Sbostic register const char *s; 201986Swnj 21*42165Sbostic for (s = str; *s; ++s); 22*42165Sbostic return(s - str); 231986Swnj } 24*42165Sbostic 25