mirror of
https://github.com/fluencelabs/musl
synced 2025-06-28 22:22:01 +00:00
add all missing wchar functions except floating point parsers
these are mostly untested and adapted directly from corresponding byte string functions and similar.
This commit is contained in:
9
src/string/wcsncasecmp.c
Normal file
9
src/string/wcsncasecmp.c
Normal file
@ -0,0 +1,9 @@
|
||||
#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);
|
||||
}
|
Reference in New Issue
Block a user