11986Swnj /* 2*35092Sbostic * Copyright (c) 1988 Regents of the University of California. 3*35092Sbostic * All rights reserved. 4*35092Sbostic * 5*35092Sbostic * Redistribution and use in source and binary forms are permitted 6*35092Sbostic * provided that the above copyright notice and this paragraph are 7*35092Sbostic * duplicated in all such forms and that any documentation, 8*35092Sbostic * advertising materials, and other materials related to such 9*35092Sbostic * distribution and use acknowledge that the software was developed 10*35092Sbostic * by the University of California, Berkeley. The name of the 11*35092Sbostic * University may not be used to endorse or promote products derived 12*35092Sbostic * from this software without specific prior written permission. 13*35092Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*35092Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*35092Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 161986Swnj */ 171986Swnj 18*35092Sbostic #if defined(LIBC_SCCS) && !defined(lint) 19*35092Sbostic static char sccsid[] = "@(#)strlen.c 5.3 (Berkeley) 07/18/88"; 20*35092Sbostic #endif /* LIBC_SCCS and not lint */ 21*35092Sbostic 22*35092Sbostic strlen(str) 23*35092Sbostic register char *str; 241986Swnj { 25*35092Sbostic register int cnt; 261986Swnj 27*35092Sbostic for (cnt = 0; *str; ++cnt, ++str); 28*35092Sbostic return(cnt); 291986Swnj } 30