Function triple_accel::levenshtein::levenshtein_simd_k_str [−][src]
pub fn levenshtein_simd_k_str(a: &str, b: &str, k: u32) -> Option<u32>
Expand description
Returns the Levenshtein distance, bounded by a cost threshold k
, between two utf8 encoded strings, using
SIMD acceleration.
Arguments
a
- first string (&str)b
- second string (&str)k
- maximum number of edits allowed betweena
andb
Example
let dist = levenshtein_simd_k_str("abc", "ab", 1); assert!(dist.unwrap() == 1);