pub fn longest_common_subsequence(a: &str, b: &str) -> usizeExpand description
Compute the length of the longest common subsequence (LCS) of two strings.
ยงExample
use scirs2_core::string_ops::longest_common_subsequence;
assert_eq!(longest_common_subsequence("abcde", "ace"), 3);
assert_eq!(longest_common_subsequence("abc", "def"), 0);