Skip to main content

unquote_str

Function unquote_str 

Source
pub fn unquote_str(s: &str) -> String
Expand description

Returns s with its quoting removed, as the shell’s quote removal does.

Removes quote chars that open or close a quote, and backslashes that escape the char after them. As in the shell, a backslash is literal in single quotes, and in double quotes it escapes only $, `, ", \, and newline. Unlike the shell’s line continuation, an escaped newline is kept. Nothing is expanded, and $'...' and $"..." aren’t treated specially.

§Arguments

  • s - The string to unquote.