Function stfu8::decode [] [src]

pub fn decode(s: &str) -> Result<Vec<u8>, DecodeError>

Decode a utf8 string containing encoded stfu8 into binary.

Examples


let expected = b"foo\xFF\nbar";
let encoded = stfu8::encode_pretty(expected);
assert_eq!(
    expected,
    stfu8::decode(&encoded).unwrap().as_slice()
);