rust/src/lib/generic_os.rs
Marijn Haverbeke 3816e57fd2 Downcase std modules again, move to :: for module dereferencing
This should be a snapshot transition.
2011-05-12 21:30:44 +02:00

10 lines
201 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));
}
}