Function percent_encoding::percent_decode [] [src]

Important traits for PercentDecode<'a>
pub fn percent_decode(input: &[u8]) -> PercentDecode

Percent-decode the given bytes.

The return value is an iterator of decoded u8 bytes that also implements Into<Cow<u8>> (which returns Cow::Borrowed when input contains no percent-encoded sequence) and has decode_utf8() and decode_utf8_lossy() methods.

Examples

use url::percent_encoding::percent_decode;

assert_eq!(percent_decode(b"foo%20bar%3F").decode_utf8().unwrap(), "foo bar?");