repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
select: overhaul for time64
[musl.git]
/
src
/
string
/
wcsncasecmp.c
blob
8fefe799c4370312f7539cc7a2e24016d9b7f546
1
#include <wchar.h>
2
#include <wctype.h>
3
4
int
wcsncasecmp
(
const wchar_t
*
l
,
const wchar_t
*
r
,
size_t
n
)
5
{
6
if
(!
n
--)
return
0
;
7
for
(; *
l
&& *
r
&&
n
&& (*
l
== *
r
||
towlower
(*
l
) ==
towlower
(*
r
));
l
++,
r
++,
n
--);
8
return
towlower
(*
l
) -
towlower
(*
r
);
9
}