The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

URL Encode A String In Rust

TODO: Pull subtitle into page object
Code
#!/usr/bin/env cargo +nightly -Zscript

//! ```cargo
//! [dependencies]
//! urlencoding = "2.1.3"
//! ```

use urlencoding::encode;

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

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

URL Encode A String In Rust

-- code
-- rust

#!/usr/bin/env cargo +nightly -Zscript

//! ```cargo
//! [dependencies]
//! urlencoding = "2.1.3"
//! ```

use urlencoding::encode;

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

-- results/

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

-- /results


-- categories
-- Rust 

-- metadata
-- date: 2023-12-20 18:00:50
-- id: 2zpjn7pv
-- site: aws
-- type: post
-- status: published