Crate comma[][src]

Expand description

comma parses command-line-style strings. See parse_command for details.

Functions

Parses a command into a list of individual tokens. Each token is separated by one or more characters of whitespace. Pairs of single- or double-quotes can be used to ignore whitespace. Within pairs of quotation marks, a backslash () can be used to escape any character. The special escape sequences ‘\n’, ‘\r’, and ‘\t’ are also handled as Newlines, Carriage Returns, and Tabs, respectively. Should a quotation mark be mismatched (no counterpart terminating mark exists), this function will return None. Otherwise, it returns a list of tokens in the input string.