Skip to main content

env_nonempty

Function env_nonempty 

Source
pub(crate) fn env_nonempty(name: &str) -> Option<String>
Expand description

Returns a trimmed environment variable value when it is set and non-empty.

§Arguments

  • name - Environment variable name.

§Returns

None when the variable is unset, not valid Unicode, or only whitespace.