pub fn decode_string<S: AsRef<str>>(s: S) -> String {
    // replacing octal escape sequences
    let s = regex_replace_all!(r#"\\0(\d\d)"#, s.as_ref(), |_, n: &str| {
        let c = u8::from_str_radix(n, 8).unwrap() as char;
        c.to_string()
    });
    // replacing hexa escape sequences
    let s = regex_replace_all!(r#"\\x([0-9a-fA-F]{2})"#, &s, |_, n: &str| {
        let c = u8::from_str_radix(n, 16).unwrap() as char;
        c.to_string()
    });
    s.to_string()
}
/// decode ascii-octal or ascii-hexa encoded strings
decode ascii-octal or ascii-hexa encoded strings
decode ascii - octal or ascii - hexa encoded strings
pub fn decode_string<S: AsRef<str>>(s: S) -> String {
    // replacing octal escape sequences
    let s = regex_replace_all!(r#"\\0(\d\d)"#, s.as_ref(), |_, n: &str| {
        let c = u8::from_str_radix(n, 8).unwrap() as char;
        c.to_string()
    });
    // replacing hexa escape sequences
    let s = regex_replace_all!(r#"\\x([0-9a-fA-F]{2})"#, &s, |_, n: &str| {
        let c = u8::from_str_radix(n, 16).unwrap() as char;
        c.to_string()
    });
    s.to_string()
}
pub fn decode_string < S : AsRef < str > > ( s : S ) -> String { // replacing octal escape sequences let s = regex_replace_all ! ( r#"\\0(\d\d)"# s as_ref ( ) n str { let c u8 from_str_radix ( n 8 ) unwrap ( ) as char c to_string ( ) } ) ; // replacing hexa escape sequences let s = regex_replace_all ! ( r#"\\x([0-9a-fA-F]{2})"# s n str { let c u8 from_str_radix ( n 16 ) unwrap ( ) as char c to_string ( ) } ) ; s . to_string ( ) }
decode ascii-octal or ascii-hexa encoded strings
decode ascii - octal or ascii - hexa encoded strings
s
S
s
S