You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

781 B


let mut args = ArgParser::new("rargsxd_example");"A test example for rargsxd")
    .copyright("Copyright (C) 2021 BubbyRoosh")
    // All instances of {name} are replaced with the name of the program.
    .usage("{name} [arguments] [other ...]")
    	Arg::bool("test", false)
    	    .help("Test boolean argument"),
    	Arg::str("long", "")
    	    .help("Long argument test"),

println!("{}", args.get_bool("test"));
println!("{}", args.get_str("long"));
println!("{:?}", args.extra);

Assuming the args passed are: -t --long-argument word another word

It would output:

["another", "word"]