#command-line #parser #words

cmdline_words_parser

Provides iterators over ‘words’ in a string, using command-line escaping rules. Intended for use where extra heap allocations are undesirable

4 releases (2 breaking)

Uses old Rust 2015

0.2.1 Apr 19, 2020
0.2.0 Mar 28, 2020
0.1.0 Oct 14, 2018
0.0.2 Mar 30, 2016

#399 in Parser implementations

Download history 112/week @ 2021-05-29 93/week @ 2021-06-05 88/week @ 2021-06-12 105/week @ 2021-06-19 37/week @ 2021-06-26 36/week @ 2021-07-03 96/week @ 2021-07-10 48/week @ 2021-07-17 36/week @ 2021-07-24 94/week @ 2021-07-31 52/week @ 2021-08-07 144/week @ 2021-08-14 156/week @ 2021-08-21 36/week @ 2021-08-28 96/week @ 2021-09-04 56/week @ 2021-09-11

475 downloads per month
Used in 10 crates (3 directly)

MIT license

13KB
322 lines

A rust crate to do inline parsing of literal command line strings (handling escape codes and splitting at whitespace)

Performs the parsing in the source string, to avoid intermediate allocations (suitable for memory-constrained environments).


lib.rs:

This crate provides a allocation-less way of parsing escaped strings (as the escaped form is longer than the original).

  • [parse_posix] Parses strings using unix shell escaping rules (see [PosixShellWords] for exact rules)

Note: This crate has no way of handling variable substitions.

No runtime deps

Features

  • alloc
  • std