#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; } |
|
来自: oskycar > 《c\vc\opencv》