Function percent_encoding::percent_decode[][src]

pub fn percent_decode(input: &[u8]) -> PercentDecode<'_>

Notable traits for PercentDecode<'a>

impl<'a> Iterator for PercentDecode<'a> type Item = u8;

Percent-decode the given bytes.

https://url.spec.whatwg.org/#percent-decode

Any sequence of % followed by two hexadecimal digits is decoded. The return type:

Examples

use percent_encoding::percent_decode;

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