public/subjects/to_url
davhojt 5f935e29a8 docs: implement Miguel's feedback 2022-05-23 20:46:23 +03:00
..
README.md docs: implement Miguel's feedback 2022-05-23 20:46:23 +03:00

README.md

to_url

Instructions

Create a function named to_url which takes a string and substitutes every white-space with "%20".

Expected functions

pub fn to_url(s: &str) -> String {
}

Usage

Here is a program to test your function.

use to_url::*;

fn main() {
	let s = "Hello, world!";
	println!("{} to be use as an url is {}", s, to_url(s));
}

And its output

$ cargo run
Hello, world! to be use as an url is Hello,%20world!
$