[−][src]Function mpd_protocol::command::escape_argument
pub fn escape_argument(argument: &str) -> Cow<str>
Escape a single argument, prefixing necessary characters (quotes and backslashes) with backslashes.
Returns a borrowed Cow
if the argument did not require escaping.
use mpd_protocol::command::escape_argument; assert_eq!(escape_argument("foo'bar\""), "foo\\'bar\\\"");