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