getOr

fnT getOr(T)(const(CfNode) * self, string key, T defaultValue = T.init) @safe pure nothrow

Gets a member's value with a default fallback.

Example:

auto doc = parseCFDocument(`port = 8080`);
auto port = doc.root.getOr!long("port", 3000);  // 8080
auto host = doc.root.getOr!string("host", "localhost");  // "localhost"

fnT getOr(T)(ref const CfNode self, string key, T defaultValue = T.init) @safe pure nothrow

ditto