algorithmz 1.2.8

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
use algorithmz::string::longest_common_prefix;

#[test]
fn test_longest_common_prefix_empty() {
    let result = longest_common_prefix("","");
    assert_eq!(result, String::from(""));
}
#[test] 
fn test_longest_common_prefix() {
    let result = longest_common_prefix("daniel","dan");
    assert_eq!(result, String::from("dan"));
}