simple--args 1.1.1

A small library for parsing arguments in Rust
Documentation
  • Coverage
  • 0%
    0 out of 5 items documented0 out of 3 items with examples
  • Size
  • Source code size: 3.62 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.26 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 12s Average build duration of successful builds.
  • all releases: 12s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • bennett-sh

Simple Args

A small library for parsing arguments in Rust

📝Docs

simpleargs::SimpleArgs

fn new(args: Vec<String>) -> SimpleArgs

Creates a new instance using the provided arguments.

fn parse(&self) -> (Vec<String>, Vec<String>, HashMap<String, String>)

Parses the arguments. Returns a tuple with:

  1. Commands (e.g. ./myprogram test)
  2. Flags (e.g. -y -myflag /anotherflag)
  3. Options (e.g. --my-message "Hello world!")

Prefixes like "-", "/" or "--" are not included in the output.

🗒️Examples

Try it out:

cargo build --lib --example [name of example]

./target/debug/examples/[name of example](.exe)