xref: /reactos/sdk/lib/3rdparty/libwine/string.c (revision c2c66aff)
1 #include <ctype.h>
2 #include "wine/config.h"
3 #include "wine/port.h"
4 
5 #ifndef HAVE_STRCASECMP
6 
7 #ifdef _stricmp
8 # undef _stricmp
9 #endif
10 
_stricmp(const char * str1,const char * str2)11 int _stricmp( const char *str1, const char *str2 )
12 {
13     const unsigned char *ustr1 = (const unsigned char *)str1;
14     const unsigned char *ustr2 = (const unsigned char *)str2;
15 
16     while (*ustr1 && toupper(*ustr1) == toupper(*ustr2)) {
17         ustr1++;
18         ustr2++;
19     }
20     return toupper(*ustr1) - toupper(*ustr2);
21 }
22 #endif
23