projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
fold strn{casecmp,cat,cmp,cpy}.3 into str{casecmp,cat,cmp,cpy}.3
[unix-history]
/
usr
/
src
/
lib
/
libc
/
string
/
strlen.c
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* %sccs.include.redist.c%
*/
#if defined(LIBC_SCCS) && !defined(lint)
static char
sccsid
[] =
"@(#)strlen.c 5.4 (Berkeley) %G%"
;
#endif
/* LIBC_SCCS and not lint */
#include <sys/stdc.h>
#include <string.h>
size_t
strlen
(
str
)
const char
*
str
;
{
register
const char
*
s
;
for
(
s
=
str
; *
s
; ++
s
);
return
(
s
-
str
);
}