Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
6651ef1f060738ee1f50cac1fe6d8ce64c359022
/
.
/
src
/
string
/
wcsnlen.c
blob: a7763373147b4fa1215a74cf20952630276b9e9a [
file
] [
log
] [
blame
]
#include
<wchar.h>
size_t
wcsnlen
(
const
wchar_t
*
s
,
size_t
n
)
{
const
wchar_t
*
z
=
wmemchr
(
s
,
0
,
n
);
if
(
z
)
n
=
z
-
s
;
return
n
;
}