[][src]Function percent_encoding::percent_decode

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

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?");