select: overhaul for time64
[musl.git] / src / string / wcsncasecmp.c
blob8fefe799c4370312f7539cc7a2e24016d9b7f546
1 #include <wchar.h>
2 #include <wctype.h>
4 int wcsncasecmp(const wchar_t *l, const wchar_t *r, size_t n)
6 if (!n--) return 0;
7 for (; *l && *r && n && (*l == *r || towlower(*l) == towlower(*r)); l++, r++, n--);
8 return towlower(*l) - towlower(*r);