js_sys

Function encode_uri

source
pub fn encode_uri(decoded: &str) -> JsString
Expand description

The encodeURI() function encodes a Uniform Resource Identifier (URI) by replacing each instance of certain characters by one, two, three, or four escape sequences representing the UTF-8 encoding of the character (will only be four escape sequences for characters composed of two “surrogate” characters).

MDN documentation