int r = strnicmp(const char *s1, const char *s2, size_t n);
nbytes in strings
s2in a case-insensitive way. If a
NULLcharacter is encountered in either string before reaching
nbytes, the comparison is stopped. Both strings must be valid UTF-8 strings.
s1 is less than
s2, -1 is returned. If
s1 is greater than
s2, 1 is returned,
otherwise the return value is 0.
n must be specified in bytes, not in characters.
Note that this function is mostly useful for checking the equality of two strings in a case-insensitive way. It is not appropriate for sorting because it currently doesn't handle all intricacies of Unicode collation. If you need to compare strings for sorting, please use hw_CompareString() instead. See hw_CompareString for details.