#include int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n) { for (; n && *l==*r && *l && *r; l++, r++); return n ? *l - *r : 0; }