You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Augusto 3cb3ecc24d Add exercise reverse_string subject and test 4 years ago
..
README.md Add exercise reverse_string subject and test 4 years ago

README.md

reverse_string

Instructions

Write a function rev_str that takes a &str as a parameter, and returns a string with its words reversed.

Expected Functions

pub fn rev_str(input: &str) -> String {
}

Usage

use reverse_string::rev_str;

fn main() {
	println!("{}", rev_str("Hello, world!"));
	println!("{}", rev_str("Hello, my name is Roman"));
	println!("{}", rev_str("I have a nice car!"));
	println!("{}", rev_str("How old are You"));
	println!("{}", rev_str("ex: this is an example água"));
}

And it's output:

!dlrow ,olleH
namoR si eman ym ,olleH
!rac ecin a evah I
uoY era dlo woH
augá elpmaxe na si siht :xe