Skip to main content

encode_component

Function encode_component 

Source
pub fn encode_component(text: &str) -> String
Expand description

Percent-encode text for use inside one URL component.

Everything outside RFC 3986’s unreserved set is encoded, spaces included — query strings are where this lands, and + for space is a convention some engines do not share, while %20 is understood by all of them.