low_str_strnicmp
Compare characters of two strings without regard to case.
l_int low_str_strnicmp (
cl_text s1,
cl_text s2,
l_size_t max
);
Return Value
The return value indicates the relationship between the substrings as follows.
Return Value Description
< 0 @s1 substring less than @s2 substring
0 @s1 substring identical to @s2 substring
> 0 @s1 substring greater than @s2 substring
Parameters
s1, s2
Null-terminated strings to compare
max
Number of characters to compare
Remarks
The low_str_strnicmp function lexicographically compares, at most, the first @max characters of @s1 and @s2.
The comparison is performed without regard to case; low_str_strnicmp is a case-insensitive version of
low_str_strncmp. The comparison ends if a terminating null character is reached in either string before @max
characters are compared. If the strings are equal when a terminating null character is reached in either string
before count characters are compared, the shorter string is lesser.
Two strings containing characters located between 'Z' and 'a' in the ASCII table ('[', '\', ']', '^', '_', and '`')
compare differently, depending on their case. For example, the two strings "ABCDE" and "ABCD^" compare one
way if the comparison is lowercase ("abcde" > "abcd^") and the other way ("ABCDE" < "ABCD^") if it is uppercase.