0.1.0 |
|
---|
#61 in #echo
5KB
52 lines
Command Parser
cmd_parser
contains a simple struct that makes the parsing of command line commands much easier.
Example
fn echo(args: Vec<&str>) {
println!("{}", args[1..].concat());
}
let mut parser = cmd_parser::CommandParser::new();
parser.insert("echo", echo);
parser.call("echo This is an example!");