LevenshteinSwift
This is a class extension on Swift.String I created to calculate Levenshtein distance, a metric for measuring the difference between two strings. I needed this as part of building an autocomplete system for my upcoming app, Rivet. I had been using an Objective C category written by Mark Aufflick, but since I ended up writing my own autocomplete controls I figured I might as well port the Levenshtein code to Swift. I wrote up a simple test-case, and an example project allowing you to score two strings (shown above).














