Sha256: 66e535ebb317eba16269fb7d755c6938fd0e53cdcea673af76c4130244eeb0ce
Contents?: true
Size: 483 Bytes
Versions: 1
Compression:
Stored size: 483 Bytes
Contents
# http://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/StringUtils.html require 'commons-lang3-3.1' module Levenshtein java_import org.apache.commons.lang3.StringUtils # Find the Levenshtein distance between two strings. def self.distance(string1, string2, threshold=nil) if threshold StringUtils.get_levenshtein_distance(string1, string2, threshold) else StringUtils.get_levenshtein_distance(string1, string2) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
levenshtein-jruby-0.1.0-java | lib/levenshtein.rb |