Skip to main content

tokenize_args

Function tokenize_args 

Source
pub fn tokenize_args(input: &str) -> Vec<String>
Expand description

Tokenize argument text with quote and escape awareness.

Handles:

  • Double quotes: "foo bar" -> single token foo bar
  • Single quotes: 'foo bar' -> single token foo bar
  • Backslash escapes: foo\ bar -> single token foo bar
  • Mixed: foo "bar baz" qux -> ["foo", "bar baz", "qux"]

Unclosed quotes are treated as extending to end of input.