blob: 30b1d1d09b7ce668d93048ba8e73ebfeb5ed84fc (
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 == 0 as Str.sbuf) {
ret Option.none[str];
} else {
ret Option.some[str](Str.str_from_cstr(s));
}
}
|