Function triple_accel::levenshtein::levenstein_naive_str[][src]

pub fn levenstein_naive_str(a: &str, b: &str) -> u32
Expand description

Returns the Levenshtein distance between two strings using the naive scalar algorithm.

Arguments

  • a - first string (&str)
  • b - second string (&str)

Example

let dist = levenstein_naive_str("abc", "ab");

assert!(dist == 1);