Write your own comparsion function:
1 2 3 4 5 6 7 8 9 10 11
|
int istrcmp(const char *s1, const char *s2)
{
int ret = 0;
while (!(ret = tolower(*(unsigned char *) s1) - tolower(*(unsigned char *) s2)) && *s2)
++s1, ++s2;
if (ret < 0)
ret = -1;
else if (ret > 0)
ret = 1 ;
return ret;
}
|
And use it instead of strcmp()
Last edited on