git://git.jankratochvil.net
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
40c5e20437bbde9d6b533349ad5e8faec966ef57
[reactos.git]
/
lib
/
ntdll
/
string
/
strnicmp.c
1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include <string.h>
3
#include <ctype.h>
4
5
int _strnicmp(const char *s1, const char *s2, size_t n)
6
{
7
8
if (n == 0)
9
return 0;
10
do {
11
if (toupper(*s1) != toupper(*s2++))
12
return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
13
if (*s1++ == 0)
14
break;
15
} while (--n != 0);
16
return 0;
17
}