Skip to main content

Mojo function

get_defined_bool

get_defined_bool[name: StringSlice[StaticConstantOrigin], default: Bool = False]() -> Bool

Get a boolean-valued define. If the name is not defined, return a default value instead. If the name is defined this will return True if the value is ("1", "true", "True", "TRUE", "on", "On", "ON") otherwise it will return False.

Parameters:

  • name (StringSlice): The name of the define.
  • default (Bool): The default value to use.

Returns:

Bool: A boolean parameter value.

Was this page helpful?