MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / url_path_component

Function url_path_component

packages/server/src/main/http.rs:181–191  ·  view source on GitHub ↗
(value: &str)

Source from the content-addressed store, hash-verified

179}
180
181fn url_path_component(value: &str) -> String {
182 value
183 .bytes()
184 .flat_map(|byte| match byte {
185 b'A'..=b'Z' | b'a'..=b'z' | b'0'..=b'9' | b'-' | b'_' | b'.' | b'~' => {
186 vec![byte as char]
187 }
188 _ => format!("%{byte:02X}").chars().collect(),
189 })
190 .collect()
191}

Callers

nothing calls this directly

Calls 1

bytesMethod · 0.65

Tested by

no test coverage detected