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

Function cannot fail if strings are valid.

Usage example (Cross-references)

Usage examples (Cross-references)
    }
    
    i32 ZstrCompareNIgnoreCase(const char *s1, const char *s2, size n) {
        if (!s1 || !s2) {
            LOG_FATAL("Invalid arguments");
    #define StrCmpIgnoreCase(str, ostr)               ZstrCompareIgnoreCase((str)->data, (ostr)->data)
    #define StrCmpZstrIgnoreCase(str, zstr)           ZstrCompareIgnoreCase((str)->data, (zstr))
    #define StrCmpCstrIgnoreCase(str, cstr, cstr_len) ZstrCompareNIgnoreCase((str)->data, (cstr), (cstr_len))
    
    //
Last updated on