Skip to content
KvConfigContains

KvConfigContains

Description

Check whether a key exists in config.

Parameters

Name Direction Description
cfg in,out Parsed config.
key in Lookup key. Prefer Str *; Zstr accepted.

Success

true if key exists.

Failure

false

Usage example (Cross-references)

Usage examples (Cross-references)
        result = result && (StrIterIndex(&si) == StrIterLength(&si));
        result = result && (MapPairCount(&cfg) == 3);
        result = result && KvConfigContains(&cfg, "host");
        result = result && host && StrCmp(host, "localhost") == 0;
        result = result && KvConfigGetI64(&cfg, "port", &port) && (port == 8080);
        result = result && (StrIterIndex(&si) == 0);
        result = result && KvConfigGetBool(&cfg, "valid", &enabled) && enabled;
        result = result && !KvConfigContains(&cfg, "later");
    
        StrDeinit(&src);
Last updated on