Skip to main content

Mojo function

get_defined_string

get_defined_string[name: StringSlice[StaticConstantOrigin]]() -> StaticString

Try to get a string-valued define. Compilation fails if the name is not defined.

Parameters:

Returns:

StaticString: A string parameter value.

get_defined_string[name: StringSlice[StaticConstantOrigin], default: StringSlice[StaticConstantOrigin]]() -> StaticString

Try to get a string-valued define. If the name is not defined, return a default value instead.

Parameters:

Returns:

StaticString: A string parameter value.

Was this page helpful?