Skip to main content

encode_uri_component

Function encode_uri_component 

Source
pub fn encode_uri_component(input: &str) -> String
Expand description

Percent-encode a string the way JavaScript’s encodeURIComponent does: everything except the unreserved set A-Za-z0-9-_.!~*'() is UTF-8 encoded to %XX (uppercase hex). Used for registry catch-all path segments (scoped npm names contain / and @) and Maven Solr query params.