Skip to main content

percent_decode_segment

Function percent_decode_segment 

Source
pub fn percent_decode_segment(segment: &str) -> String
Expand description

Percent-decode one URI path segment per RFC 3986. + is a literal + in a path (only application/x-www-form-urlencoded data maps it to a space). A malformed escape (%zz, a trailing %) is kept verbatim, and bytes that do not form valid UTF-8 are replaced lossily – decoding never fails and never panics.