Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 1 | #include <wchar.h> |
2 | |||||
3 | int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n) | ||||
4 | { | ||||
Rich Felker | 054ba18 | 2012-05-26 18:04:17 -0400 | [diff] [blame] | 5 | for (; n && *l==*r && *l && *r; n--, l++, r++); |
Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame] | 6 | return n ? *l - *r : 0; |
7 | } |