blob: 6b2795af93e90b6700f2a6a878255900cfc78328 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
|
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));
}
}
|