[][src]Function fungus::sys::args

pub fn args() -> Args

Returns the arguments that this program was started with (normally passed via the command line). Wraps std::env::args

The first element is traditionally the path of the executable, but it can be set to arbitrary text, and may not even exist.

Panics

The returned iterator will panic during iteration if any argument to the process is not valid unicode. If this is not desired, use the [args_os] function instead.

Examples

use fungus::prelude::*;

// Prints each argument on a separate line
for argument in sys::args() {
    println!("{}", argument);
}