Skip to main content

percent_encode

Function percent_encode 

Source
pub fn percent_encode(value: &str) -> String
Expand description

Percent-encodes value for use as one path segment or query value of a URL: everything but the unreserved characters of RFC 3986 (letters, digits, -, ., _, ~) is escaped.

assert_eq!(agentai_core::percent_encode("a/b?c d"), "a%2Fb%3Fc%20d");