Mojo function
env_get_bool
env_get_bool[name: StringSlice[StaticConstantOrigin]]() -> Bool
Try to get an boolean-valued define. Compilation fails if the name is not defined or the value is neither True or False.
Parameters:
- โname (
StringSlice): The name of the define.
Returns:
Bool: An boolean parameter value.
env_get_bool[name: StringSlice[StaticConstantOrigin], default: Bool]() -> Bool
Try to get an bool-valued define. If the name is not defined, return a default value instead. The boolean must be either True or False.
Parameters:
- โname (
StringSlice): The name of the define. - โdefault (
Bool): The default value to use.
Returns:
Bool: An bool parameter value.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!