#define __tolower(c) ((('A' <= (c))&&((c) <= 'Z')) ? ((c) - 'A' + 'a') : (c))
int strcasecmp(const char *s1, const char *s2)
{
const unsigned char *p1 = (const unsigned char *) s1;
const unsigned char *p2 = (const unsigned char *) s2;
int result = 0;
if (p1 == p2)
{
return 0;
}
while ((result = __tolower(*p1) - __tolower(*p2)) == 0)
{
if (*p1++ == '\0')
{
break;
}
p2++;
}
return result;
}
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。