std.env.arguments
Show source codeHide source code
fn pub arguments -> Array[String] {
let len = inko_env_arguments_size(_INKO.state) as Int
let mut idx = 0
let args = []
while idx < len {
args.push(inko_env_argument(_INKO.state, idx))
idx += 1
}
args
}
fn pub static arguments -> Array[String]
Returns an Array
containing all the commandline arguments passed to the
current program.
Examples
import std.env
# Assuming this program is executed using `inko foo.inko first second`:
env.arguments # => ['first', 'second']