@ -10,7 +10,7 @@ A ROT13 on the Latin alphabet would be as follows:
- Cipher: nopqrstuvwxyzabcdefghijklm
Your purpose in this exercise is to create a similar `rot` function that is a better version of the ROT13 cipher.
Your purpose in this exercise is to create a similar `rotate` function that is a better version of the ROT13 cipher.
Your function will receive a string and a number and it will rotate each letter of that string the number of times settled by the second argument to the right, or to the left if the number are negative.
@ -24,7 +24,7 @@ they will remain the same.
### Expected functions
```rust
pub fn rot(input: &str, key: i8) -> String {}
pub fn rotate(input: &str, key: i8) -> String {}
```
### Usage
@ -36,25 +36,25 @@ use rot::rot;
fn main() {
println!("The letter \"a\" becomes: {}", rot("a", 26));
println!("The letter \"m\" becomes: {}", rot("m", 0));
println!("The letter \"m\" becomes: {}", rot("m", 13));
println!("The letter \"a\" becomes: {}", rot("a", 15));
println!("The word \"MISS\" becomes: {}", rot("MISS", 5));
println!("The letter \"a\" becomes: {}", rotate("a", 26));
println!("The letter \"m\" becomes: {}", rotate("m", 0));
println!("The letter \"m\" becomes: {}", rotate("m", 13));
println!("The letter \"a\" becomes: {}", rotate("a", 15));
println!("The word \"MISS\" becomes: {}", rotate("MISS", 5));