Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
musl
/
0f9b1f672b68b7c3570f07b130cc5c8938b22bad
/
.
/
src
/
string
/
strcasecmp.c
blob: 02fd5f8ca499267b1b6420fd6c4fc2aa007ae56f [
file
] [
log
] [
blame
]
#include
<strings.h>
#include
<ctype.h>
int
strcasecmp
(
const
char
*
_l
,
const
char
*
_r
)
{
const
unsigned
char
*
l
=(
void
*)
_l
,
*
r
=(
void
*)
_r
;
for
(;
*
l
&&
*
r
&&
(*
l
==
*
r
||
tolower
(*
l
)
==
tolower
(*
r
));
l
++,
r
++);
return
tolower
(*
l
)
-
tolower
(*
r
);
}