Skip to content

Instantly share code, notes, and snippets.

View quintonpryce's full-sized avatar

Quinton Pryce quintonpryce

  • TextNow
  • Guelph
View GitHub Profile
@quintonpryce
quintonpryce / Levenshtein.swift
Created December 31, 2019 15:58 — forked from RuiNelson/Levenshtein.swift
Levenshtein distance between two String for Swift 4.x
import Foundation
extension String {
subscript(index: Int) -> Character {
return self[self.index(self.startIndex, offsetBy: index)]
}
}
extension String {
public func levenshtein(_ other: String) -> Int {