String algorithms and data structures, implemented in Swift.
- iOS 8.0+
- Xcode 9
- Swift 4
Install CocoaPods
$ gem install cocoapods
Add the following to your Podfile:
target '<Your Target Name>' do
pod `StringAlgorithms`
endInstall the pod
pod install
Fork / Clone this repo, build the framework and add the built StringAlgorithms.framework into your Xcode project.
| Algorithm | Format |
|---|---|
| Hamming Distance | a.hammingDistance(to: b) |
| Levenshtein Distance | a.levenshteinDistance(to: b) |
| Optimal String Alignment | a.optimalStringAlignmentDistance(to: b) |
| Damerau-Levenshtein Distance | a.damerauLevenshteinDistance(to: b) |
| Longest Common Subsequence | a.longestCommonSubsequence(other: b) |
| Longest Common Substring | a.longestCommonSubstring(other: b) |
- Trie