Function percent_encoding::percent_encode_byte [] [src]

pub fn percent_encode_byte(byte: u8) -> &'static str

Return the percent-encoding of the given bytes.

This is unconditional, unlike percent_encode() which uses an encode set.

Examples

use url::percent_encoding::percent_encode_byte;

assert_eq!("foo bar".bytes().map(percent_encode_byte).collect::<String>(),
           "%66%6F%6F%20%62%61%72");