pub fn urlencode(value: Value, args: HashMap<String, Value>) -> Result<Value> {
    let s = try_get_value!("urlencode", "value", String, value);
    let safe = match args.get("safe") {
        Some(l) => try_get_value!("urlencode", "safe", String, l),
        None => "/".to_string(),
    };

    let encoded = utf8_percent_encode(s.as_str(), UrlEncodeSet(safe)).collect::<String>();
    Ok(to_value(&encoded).unwrap())
}
/// Percent-encodes reserved URI characters
Percent-encodes reserved URI characters
Percent - encodes reserved URI characters
pub fn urlencode(value: Value, args: HashMap<String, Value>) -> Result<Value> {
    let s = try_get_value!("urlencode", "value", String, value);
    let safe = match args.get("safe") {
        Some(l) => try_get_value!("urlencode", "safe", String, l),
        None => "/".to_string(),
    };
    let encoded = utf8_percent_encode(s.as_str(), UrlEncodeSet(safe)).collect::<String>();
    Ok(to_value(&encoded).unwrap())
}
pub fn urlencode ( value : Value , args : HashMap < String , Value > ) -> Result < Value > { let s = try_get_value ! ( " " " " String value ) ; let safe = match args . get ( " " ) { Some ( l ) => try_get_value ! ( " " " " String l ) , None => " " . to_string ( ) , } ; let encoded = utf8_percent_encode ( s . as_str ( ) , UrlEncodeSet ( safe ) ) . collect :: < String > ( ) ; Ok ( to_value ( & encoded ) . unwrap ( ) ) }
Percent-encodes reserved URI characters
Percent - encodes reserved URI characters
value
Value
args
HashMap<String, Value>
value
Value
args
HashMap<String, Value>