rust/src/lib/generic_os.rs
Marijn Haverbeke 09d8ef8d51 Finally rename std::_xxx to std::xxx
Except for _task, which is still a keyword.
2011-05-17 20:41:41 +02:00

10 lines
199 B
Rust

fn getenv(str n) -> option::t[str] {
auto s = os::libc::getenv(str::buf(n));
if ((s as int) == 0) {
ret option::none[str];
} else {
ret option::some[str](str::str_from_cstr(s));
}
}