Skip to main content

get

Function get 

Source
pub fn get(key: String) -> Option<String>
Expand description

Returns the value of an environment variable.

§Arguments

  • key - The environment variable name

§Returns

Some(value) if the variable exists and is valid UTF-8, None otherwise.

§Example

use logicaffeine_system::env;

let path = env::get("PATH".to_string());