Rivoreo Source Code Repositories
src.rivoreo.one
/
devel
/
celibc
/
ff0ae249007110b3a07f5cf33a9dea9d41904bc6
/
.
/
string
/
strnlen.c
blob: 280e78af2dee2ab9053fc7c05fca05ec755ea53c [
file
] [
log
] [
blame
] [
raw
]
#include
<string.h>
size_t
strnlen
(
const
char
*
s
,
size_t
maxlen
)
{
const
char
*
start
=
s
;
while
(
maxlen
--
>
0
&&
*
s
)
s
++;
return
s
-
start
;
}