Levenshtein

public final class Levenshtein

Levenshtein edit distance calculator From https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance#Swift

Inspired by https://gist.github.com/bgreenlee/52d93a1d8fa1b8c1f38b Improved with http://stackoverflow.com/questions/26990394/slow-swift-arrays-and-strings-performance

  • Calclates and returns the levenshtein distance between two strings.

    Declaration

    Swift

    public class func distanceBetween(_ aStr: String, and bStr: String) -> Int