#percent #encode #web #uri #string

uri-pct

Percent encode/decode uri components or strs

2 releases

0.1.1 May 10, 2021
0.1.0 May 10, 2021

#1701 in Encoding

Artistic-2.0

4KB
55 lines

Percent Encoding str

This package provides a functional interface for encoding/decoding strs. It does its best to decode malformed strings (such as "%2%20%" => " ").

usage

use uri-pct;

let x = uri-pct::encode("hello world!");
// x = "hello%20world%21"
let y = uri-pct::decode(x);
// y = "hello world!"

No runtime deps