Skip to content
instance method

Gem::Text#levenshtein_distance

levenshtein_distance(str1, str2)

Returns a value representing the “cost” of transforming str1 into str2 Vendored version of DidYouMean::Levenshtein.distance from the ruby/did_you_mean gem @ 1.4.0 github.com/ruby/did_you_mean/blob/2ddf39b874808685965dbc47d344cf6c7651807c/lib/did_you_mean/levenshtein.rb#L7-L37

See also #format_text #truncate_text #clean_text also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0