1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #include <wchar.h>
- #include "locale/runetype.h"
- int
- wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n)
- {
- size_t i;
- for (i = 0; i < n; i++) {
- if (*s1 != *s2) {
-
- return *(const rune_t *)s1 >
- *(const rune_t *)s2 ? 1 : -1;
- }
- s1++;
- s2++;
- }
- return 0;
- }
|