reactos/lib/sdk/crt/string/strnicmp.c
Amine Khaldi c424146e2c Create a branch for cmake bringup.
svn path=/branches/cmake-bringup/; revision=48236
2010-07-24 18:52:44 +00:00

18 lines
338 B
C

#include <precomp.h>
/*
* @implemented
*/
int _strnicmp(const char *s1, const char *s2, size_t n)
{
if (n == 0)
return 0;
do {
if (toupper(*s1) != toupper(*s2++))
return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2);
if (*s1++ == 0)
break;
} while (--n != 0);
return 0;
}