Function sqlib::escaping::unescape

source ·
pub fn unescape(s: &str) -> String
Expand description

unescapes all chars described in the server query manual

Example

use sqlib::escaping::unescape;

let unescaped = "hello world/|\\".to_string();
let escaped = "hello\\sworld\\/\\p\\\\".to_string();

let s = unescape(&escaped);

assert_eq!(s, unescaped);