winarg 0.2.0

Windows command line argument parsing
Documentation
  • Coverage
  • 88.89%
    16 out of 18 items documented11 out of 16 items with examples
  • Size
  • Source code size: 16.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 647.96 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • ChrisDenton/winarg
    5 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ChrisDenton

The Windows command line is passed to applications as a string. To get an array of arguments it's necessary to parse this string, which is what this crate does. This list of arguments can then be used by higher level argument parsers.

It uses the latest C/C++ parsing rules so that it is consistent with using argv from a C/C++ program.

Using

Add this to your Cargo.toml file

[dependencies.winarg]
version = "0.2.0"

Example

for arg in winarg::args_native().skip(1) {
    if arg == "--help" {
        println!("help me!");
    }
}