Levenshtein

master

Tiny Swift implementation of the Levenshtein algorithm
decryptOS/Levenshtein

Levenshtein

Tiny Swift implementation of the Levenshtein algorithm

Installation

Swift Package Manager

To use this package with the Swift Package Manager you include this repository in your Package.swift file:

import PackageDescription

let package = Package(
    // ...
    dependencies: [
        // ...
        .Package(url: "https://github.com/decryptOS/Levenshtein.git", majorVersion: 0, minor: 1),
        // ...
    ]
)

Usage

import Levenshtein

// ...

let a = "Apple"
let b = "Apples"
assert(levenshteinDistance(a, b) == 1)
// 1 because 1 change is necessary to transform between a and b

Description

  • Swift Tools 4.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Mon Nov 07 2022 21:02:23 GMT-0500 (GMT-05:00)