Function origin_studio::std::env::var

source ·
pub fn var<K: AsRef<str>>(key: K) -> Result<&'static str, VarError>
Examples found in repository?
examples/args.rs (line 11)
7
8
9
10
11
12
fn main() {
    for i in std::env::args() {
        writeln!(std::io::stdout(), "arg {}", i).unwrap();
    }
    writeln!(std::io::stdout(), "HOME {}", std::env::var("HOME").unwrap()).unwrap();
}