2011-05-12 10:24:54 -05:00
|
|
|
|
2011-06-15 13:19:50 -05:00
|
|
|
|
|
|
|
fn getenv(str n) -> option::t[str] {
|
|
|
|
auto s = os::libc::getenv(str::buf(n));
|
|
|
|
ret if (s as int == 0) {
|
|
|
|
option::none[str]
|
|
|
|
} else { option::some[str](str::str_from_cstr(s)) };
|
2011-07-17 21:16:18 -05:00
|
|
|
}
|