shtring 0.1.0

Split an input string into arguments by whitespace such that text between matching quotes is combined into a single argument.
Documentation
  • Coverage
  • 100%
    6 out of 6 items documented2 out of 4 items with examples
  • Size
  • Source code size: 19.74 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.62 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Spanfile/shtring
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Spanfile

shtring

Split an input string into arguments by whitespace such that text between matching quotes is combined into a single argument. Additionally, single character escapes are supported and ignored where applicable.

let input = "Hello world! \"This text will be a single argument.\" 'So \"will\" this.' \\\'Escaped quotes are ignored.\\\'";
let output = shtring::split(input)?;
assert_eq!(output, vec![
    "Hello",
    "world!",
    "This text will be a single argument.",
    "So \"will\" this.",
    "\\\'Escaped",
    "quotes",
    "are",
    "ignored.\\\'",
]);