Skip to content
ZstrCompareNIgnoreCase

ZstrCompareNIgnoreCase

Description

Compare two strings up to n characters, ignoring ASCII case.

Success

Returns 0 if equal under ASCII-case folding, <0 / >0 otherwise.

Failure

Aborts via LOG_FATAL when either string pointer is NULL.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    i32 ZstrCompareNIgnoreCase(Zstr s1, Zstr s2, size n) {
        if (!s1 || !s2) {
            LOG_FATAL("Invalid arguments");
    i32 str_cmp_cstr_ignore_case(const Str *s, Zstr other, size other_len) {
        ValidateStr(s);
        return ZstrCompareNIgnoreCase(StrBegin(s), other, other_len);
    }
Last updated on