Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

URL Encode A String In Rust

Code

```cargo
[dependencies]
urlencoding = "2.1"
```

use urlencoding::encode;

fn main() {
  let encoded = encode("This string will be URL encoded.")
    .into_owned();
  println!("{}", encoded);
}

Results

This%20string%20will%20be%20URL%20encoded.