fix wrong return value from wmemmove on forward copies
[musl] / src / string / strcasecmp.c
1 #include <strings.h>
2 #include <ctype.h>
3
4 int strcasecmp(const char *_l, const char *_r)
5 {
6         const unsigned char *l=(void *)_l, *r=(void *)_r;
7         for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
8         return tolower(*l) - tolower(*r);
9 }