Skip to main content

urlencode

Function urlencode 

Source
pub fn urlencode(text: &str) -> String
Expand description

URL encode a string

ยงExamples

use reinhardt_utils::utils_core::encoding::urlencode;

assert_eq!(urlencode("hello world"), "hello+world");
assert_eq!(urlencode("hello@world.com"), "hello%40world.com");
assert_eq!(urlencode("test&value=1"), "test%26value%3D1");