[][src]Function shellwords::escape

pub fn escape(input: &str) -> String

Escapes a string so it will be interpreted as a single word by the UNIX Bourne shell.

If the input string is empty, this function returns an empty quoted string.

Examples

assert_eq!(escape("special's.txt"), "special\\'s.txt".to_string());