Function isBoolean

Check if the entry value can be interpreted as boolean value.

bool isBoolean (
  scope const(char)[] value
) pure nothrow @nogc @safe;

See Also

isTrue, isFalse

Example

assert(isBoolean("true"));
assert(isBoolean("1"));
assert(isBoolean("false"));
assert(isBoolean("0"));
assert(!isBoolean("not boolean"));