algorithmz 1.2.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::convert_morse;

#[test]
fn test_convert_morse_empty() {
    let result = convert_morse("");
    assert_eq!(result, Err("Cannot convert an empty string!".to_string()));
}

#[test]
fn test_convert_morse() {
    let result = convert_morse("tonic");
    assert_eq!(result, Ok(String::from("-----...-.-.")));
}