[][src]Function rfc2047_decoder::decode

pub fn decode(encoded_str: &[u8]) -> Result<String>

Decode a RFC 2047 MIME Message Header.

fn main() {
    match rfc2047_decoder::decode("=?utf8?q?str_with_spaces?=".as_bytes()) {
        Ok(s) => println!("{}", s),
        Err(err) => panic!(err),
    }
}

Errors

The function can return an error if the lexer, the parser or the evaluator encounters an error.