Skip to main content
Log in

Mojo function

env_get_string

env_get_string[name: StringLiteral]() -> StringLiteral

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

Parameters:

  • name (StringLiteral): The name of the define.

Returns:

A string parameter value.

env_get_string[name: StringLiteral, default: StringLiteral]() -> StringLiteral

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

Parameters:

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

Returns:

A string parameter value.

Was this page helpful?