Function percent_encoding::utf8_percent_encode [−][src]
pub fn utf8_percent_encode<E: EncodeSet>(
input: &str,
encode_set: E
) -> PercentEncode<'_, E>ⓘNotable traits for PercentEncode<'a, E>impl<'a, E: EncodeSet> Iterator for PercentEncode<'a, E> type Item = &'a str;
Expand description
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");