Skip to main content

escape_shell_single_quotes

Function escape_shell_single_quotes 

Source
pub fn escape_shell_single_quotes(value: &str) -> String
Expand description

Escapes a string for safe use inside shell single quotes.

Strategy: wrap in single quotes and escape inner single quotes with the sequence '\'' (close quote, backslash-quote, open quote).