From e0614f7cd418afedd06c9bcd5abb965608bc52f8 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Thu, 1 Mar 2012 23:24:45 -0500 Subject: add all missing wchar functions except floating point parsers these are mostly untested and adapted directly from corresponding byte string functions and similar. --- src/string/wcsncasecmp.c | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/string/wcsncasecmp.c (limited to 'src/string/wcsncasecmp.c') diff --git a/src/string/wcsncasecmp.c b/src/string/wcsncasecmp.c new file mode 100644 index 00000000..8fefe799 --- /dev/null +++ b/src/string/wcsncasecmp.c @@ -0,0 +1,9 @@ +#include +#include + +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); +} -- cgit v1.2.1