Crates.io | cs |
lib.rs | cs |
version | 0.0.4 |
source | src |
created_at | 2020-11-01 17:19:43.935574 |
updated_at | 2020-11-01 17:46:34.497228 |
description | Find common substrings among multiple input strings |
homepage | |
repository | https://github.com/TianyiShi2001/cs |
max_upload_size | |
id | 307592 |
size | 7,398 |
Computing the (Longest) Common Substring
use cs::longest_common_substring
let lcs = longest_common_substring(&[
"ZYABCAGB",
"BCAGDTZYY",
"DACAGZZYSC",
"CAGYZYSAU",
"CAZYUCAGF",
]);
assert_eq!(lcs, "CAG");