blob: 567843f28c575d09ce27e18abb500d60a3096465 (
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));
}
}
|