Skip to main content

split_args

Function split_args 

Source
pub fn split_args(line: &str) -> Result<Vec<String>, ArgError>
Expand description

Split a command line into parameters per RFC 2229 §2.2.

Parameters are separated by spaces or tabs. A parameter may be an atom, a double-quoted string, a single-quoted string, or any concatenation of those; a backslash quotes the next character wherever it appears. The real dict(1) client quotes every word it sends (define * "hello"), so quoting is the common case rather than an edge.