Function percent_encoding::utf8_percent_encode [] [src]

Important traits for PercentEncode<'a, E>
pub fn utf8_percent_encode<E: EncodeSet>(
    input: &str,
    encode_set: E
) -> PercentEncode<E>

Percent-encode the UTF-8 encoding of the given string.

See percent_encode() for how to use the return value.

Examples

use url::percent_encoding::{utf8_percent_encode, DEFAULT_ENCODE_SET};

assert_eq!(utf8_percent_encode("foo bar?", DEFAULT_ENCODE_SET).to_string(), "foo%20bar%3F");