overhaul internally-public declarations using wrapper headers
[musl.git] / src / string / strcasecmp.c
blob3cd5f2d0243e5b5ce5048282e03321763509db67
1 #include <strings.h>
2 #include <ctype.h>
3 #include "libc.h"
5 int strcasecmp(const char *_l, const char *_r)
7 const unsigned char *l=(void *)_l, *r=(void *)_r;
8 for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
9 return tolower(*l) - tolower(*r);
12 int __strcasecmp_l(const char *l, const char *r, locale_t loc)
14 return strcasecmp(l, r);
17 weak_alias(__strcasecmp_l, strcasecmp_l);