encode_uri_component

Function encode_uri_component 

Source
pub fn encode_uri_component<T: AsRef<[u8]>>(url: T) -> String
Expand description

Percent-encode a URI component string that is valid UTF-8.

encode_uri_component escapes all characters except a-z A-Z 0-9 - _ . ! ~ * ' ( ).

ยงExamples

use aidoku::helpers::uri::encode_uri_component;
assert_eq!(
    encode_uri_component(";,/?:@&=+$"),
    "%3B%2C%2F%3F%3A%40%26%3D%2B%24",
)