edit_distance

Function edit_distance 

Source
pub fn edit_distance(a: impl AsRef<str>, b: impl AsRef<str>) -> usize
Expand description

Returns the edit distance between strings a and b.

The runtime complexity is O(m*n), where m and n are the strings’ lengths.

§Examples

use edit_distance::edit_distance;

edit_distance("kitten", "sitting"); // => 3