Skip to content

ipsosante/Levenshtein

Repository files navigation

Levenshtein

CC BY-SA 3.0 Bitrise Platform Swift version

Calculate the Levenshtein distance between two Strings.

Based on the implementation found at https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance.

Updated for modern (5+) Swift syntax.

Usage

let dog = "Black Russian Terrier"
let cat = "Russian Blue"
Levenshtein.distance(between: dog, and: cat) // 12

License

This implementation of the Levenshtein distance is released under the CC BY-SA 3.0 license. See LICENSE.md for details.

About

Levenshtein distance implemented in Swift

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages