#words #arguments-parser #parser #command-line #posix-shell

no-std 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

#2621 in Parser implementations

Download history 261/week @ 2024-07-23 301/week @ 2024-07-30 393/week @ 2024-08-06 399/week @ 2024-08-13 268/week @ 2024-08-20 211/week @ 2024-08-27 206/week @ 2024-09-03 141/week @ 2024-09-10 123/week @ 2024-09-17 145/week @ 2024-09-24 131/week @ 2024-10-01 102/week @ 2024-10-08 146/week @ 2024-10-15 133/week @ 2024-10-22 152/week @ 2024-10-29 146/week @ 2024-11-05

596 downloads per month
Used in 10 crates (4 directly)

MIT license

14KB
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