Do some string library work

This commit is contained in:
Justine Tunney 2022-08-20 21:36:07 -07:00
parent 83d41e4588
commit 35203c0551
42 changed files with 1381 additions and 136 deletions

View file

@ -30,6 +30,6 @@ int wcsncasecmp(const wchar_t *a, const wchar_t *b, size_t n) {
size_t i = 0;
unsigned x, y;
if (!n-- || a == b) return 0;
while ((x = tolower(a[i])) == (y = tolower(b[i])) && b[i] && i < n) ++i;
while ((x = towlower(a[i])) == (y = towlower(b[i])) && b[i] && i < n) ++i;
return x - y;
}