Method: FatCore::String#distance
- Defined in:
- lib/fat_core/string.rb
permalink #distance(other) ⇒ Integer
Return the Damerau-Levenshtein distance between self an another string using a transposition block size of 1 and quitting if a max distance of 10 is reached.
216 217 218 |
# File 'lib/fat_core/string.rb', line 216 def distance(other) DamerauLevenshtein.distance(self, other.to_s, 1, 10) end |