mirror of
https://github.com/fluencelabs/musl
synced 2025-06-28 14:11:56 +00:00
these are mostly untested and adapted directly from corresponding byte string functions and similar.
10 lines
249 B
C
10 lines
249 B
C
#include <wchar.h>
|
|
#include <wctype.h>
|
|
|
|
int wcsncasecmp(const wchar_t *l, const wchar_t *r, size_t n)
|
|
{
|
|
if (!n--) return 0;
|
|
for (; *l && *r && n && (*l == *r || towlower(*l) == towlower(*r)); l++, r++, n--);
|
|
return towlower(*l) - towlower(*r);
|
|
}
|