Last active
August 29, 2015 14:21
-
-
Save nacika-ins/c08b3c275d80796a2fe7 to your computer and use it in GitHub Desktop.
Like encodeURIComponent that by Rust
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern crate url; | |
use url::percent_encoding::utf8_percent_encode; | |
use url::percent_encoding::FORM_URLENCODED_ENCODE_SET; | |
fn main () { | |
let a = "https://gist.github.com/nacika-ins/c08b3c275d80796a2fe7"; | |
let b = utf8_percent_encode(a, FORM_URLENCODED_ENCODE_SET); | |
println!("{}", b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment