ref: 1c52c3c30241558dcc6bf01a618528cfe8f552b2
dir: /libstd/env.myr/
use "extremum.use" use "option.use" use "sleq.use" pkg std = extern var _environment : byte[:][:] const getenv : (name : byte[:] -> std.option(byte[:])) ;; const getenv = {name var i var n for i = 0; i < _environment.len; i++ n = min(name.len, _environment[i].len) if sleq(name, _environment[i][:n]) && sleq(_environment[i][n:n+1], "=") -> `Some _environment[i][n+1:] ;; ;; -> `None }