#include <msvcrt/wchar.h>

int _wcsnicmp (const wchar_t *cs, const wchar_t *ct, size_t count)
{
	if (count == 0)
		return 0;
	do {
		if (towupper(*cs) != towupper(*ct++))
			return towupper(*cs) - towupper(*--ct);
		if (*cs++ == 0)
			break;
	} while (--count != 0);
	return 0;
}
