algorithmz 1.1.9

This is the corresponding implemenation of the python module of the same name.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use algorithmz::string::reverse_vowels;

#[test]
fn test_reverse_vowels_empty() {
    let result = reverse_vowels("");
    assert_eq!(result, Err(String::from("Cannot reverse vowels of an empty string!")));
}

#[test]
fn test_reverse_vowels() {
    let result = reverse_vowels("hello");
    assert_eq!(result, Ok(String::from("holle")));
}