Skip to main content

encode_component

Function encode_component 

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

Percent-encode a URI component: every byte outside the RFC 3986 unreserved set becomes an upper-case %XX escape of its UTF-8 encoding.

Safe for a query key or value (in a plain or form-encoded query), and for a single path segment.