Function quoted_printable::decode_str [] [src]

pub fn decode_str(
    input: &str,
    mode: ParseMode
) -> Result<Vec<u8>, QuotedPrintableError>

Decodes a piece of quoted-printable data. Refer to the documentation for decode; this is just a wrapper that calls that function on the utf-8 bytes from the provided string.

Examples

use quoted_printable::{decode_str, ParseMode};
    let decoded = decode_str("hello=3Dworld=0D=0A", ParseMode::Robust).unwrap();
    assert_eq!("hello=world\r\n", String::from_utf8(decoded).unwrap());