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:
Rich Felker
2012-03-01 23:24:45 -05:00
parent 899b13cae7
commit e0614f7cd4
12 changed files with 98 additions and 0 deletions

9
src/string/wcsncasecmp.c Normal file
View 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);
}