#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

#2317 in Parser implementations

Download history 207/week @ 2023-12-13 182/week @ 2023-12-20 85/week @ 2023-12-27 135/week @ 2024-01-03 250/week @ 2024-01-10 289/week @ 2024-01-17 218/week @ 2024-01-24 110/week @ 2024-01-31 235/week @ 2024-02-07 158/week @ 2024-02-14 162/week @ 2024-02-21 132/week @ 2024-02-28 163/week @ 2024-03-06 304/week @ 2024-03-13 340/week @ 2024-03-20 279/week @ 2024-03-27

1,115 downloads per month
Used in 8 crates (3 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