Function boolToString

Convert bool to string. Can be used to set boolean values.

string boolToString (
  bool b
) pure nothrow @nogc @safe;

See Also

isBoolean

Example

assert(boolToString(false) == "false");
assert(boolToString(true) == "true");