URL Encode A String In Rust
There's a create that does the encoding (see below), but most of the time I want a pretty URL. This is what I'm using :
```cargo
= "1.10.4"
```
use Regex;
regex
This is the way to do it with actual encoding. (NOTE : I haven't tested the above to see if there are any characters that get passed that shouldn't go in the URL, but it should just be word characters in which case things should be okay.)
```cargo
= "2.1"
```
use encode;
urlencoding
- The [TODO: Code shorthand span ] call returns a [TODO: Code shorthand span ] . Calling [TODO: Code shorthand span ] is what makes it a [TODO: Code shorthand span ]
-
[]
Test the output from the regex to make sure no invalid URL characters can make it through
~ fin ~