Skip to main content

quote_argument

Function quote_argument 

Source
pub fn quote_argument(argument: &str, output: &mut String)
Expand description

Appends one argument encoded with the quoting rules used by MSVC-compatible Windows command-line parsers and std::process::Command.

Callers that build a complete command line from untrusted arguments should prefer join_arguments, which rejects NUL characters.

This low-level helper intentionally does not reject NUL characters because it appends into caller-owned output.