ZstrCompareIgnoreCase
Description
Compare two strings lexicographically, ignoring ASCII case. Non-ASCII bytes are compared as-is (no Unicode case folding).
Success
Returns 0 if equal under ASCII-case folding, <0 if lowered s1 < lowered s2, >0 otherwise.
Failure
Aborts via LOG_FATAL when either string pointer is NULL.
Usage example (Cross-references)
Usage examples (Cross-references)
- In
Zstr.c:99:
}
i32 ZstrCompareIgnoreCase(Zstr s1, Zstr s2) {
if (!s1 || !s2) {
LOG_FATAL("Invalid arguments");- In
Str.c:226:
ValidateStr(s);
ValidateStr(other);
return ZstrCompareIgnoreCase(StrBegin(s), StrBegin(other));
}- In
Str.c:231:
i32 str_cmp_zstr_ignore_case(const Str *s, Zstr other) {
ValidateStr(s);
return ZstrCompareIgnoreCase(StrBegin(s), other);
}
Last updated on