projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[CDMAKE][CTR] Fix strtok_s for empty strings. Part of Wine commit 4fa616c by Bernhard...
[reactos.git]
/
reactos
/
sdk
/
lib
/
crt
/
string
/
strnicmp.c
1
#include <precomp.h>
2
3
/*
4
* @implemented
5
*/
6
int
CDECL
_strnicmp
(
const char
*
s1
,
const char
*
s2
,
size_t
n
)
7
{
8
9
if
(
n
==
0
)
10
return
0
;
11
do
{
12
if
(
toupper
(*
s1
) !=
toupper
(*
s2
++))
13
return
toupper
(*(
unsigned const char
*)
s1
) -
toupper
(*(
unsigned const char
*)--
s2
);
14
if
(*
s1
++ ==
0
)
15
break
;
16
}
while
(--
n
!=
0
);
17
return
0
;
18
}