blob: 4ab32a924c4657dadd98677d4771042f120f43c8 [file] [log] [blame]
Rich Felker0b44a032011-02-12 00:22:29 -05001#include <wchar.h>
2
3int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n)
4{
Rich Felker054ba182012-05-26 18:04:17 -04005 for (; n && *l==*r && *l && *r; n--, l++, r++);
Rich Felker0b44a032011-02-12 00:22:29 -05006 return n ? *l - *r : 0;
7}