Reverse a string
For example: input: "cool" output: "looc"
Test your function on this string: uüu
and see what happens. Try to write a function that properly
reverses this string. Hint: grapheme clusters
To get the bonus test to run, remove the ignore flag (#[ignore]
) from the
last test, and execute the tests with:
$ cargo test --features grapheme
You will need to use external libraries (a crate
in rust lingo) for the bonus task. A good place to look for those is crates.io, the official repository of crates.
Check the documentation for instructions on how to use external crates in your projects.
Sign up to Exercism to learn and master Rust with 96 exercises, and real human mentoring, all for free.