- Define _CTYPE_DISABLE_MACROS for MSVC build.
[reactos.git] / reactos / lib / string / stricmp.c
1 #include <string.h>
2 #include <ctype.h>
3
4 /*
5 * @implemented
6 */
7 int
8 _stricmp(const char *s1, const char *s2)
9 {
10 while (toupper(*s1) == toupper(*s2))
11 {
12 if (*s1 == 0)
13 return 0;
14 s1++;
15 s2++;
16 }
17 return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2));
18 }
19
20 /*
21 * @implemented
22 */
23 int
24 _strcmpi(const char *s1, const char *s2)
25 {
26 return _stricmp(s1,s2);
27 }