blob: 02fd5f8ca499267b1b6420fd6c4fc2aa007ae56f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
#include <strings.h>
#include <ctype.h>
int strcasecmp(const char *_l, const char *_r)
{
const unsigned char *l=(void *)_l, *r=(void *)_r;
for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
return tolower(*l) - tolower(*r);
}
|