Skip to content

koyachi/NSString-LevenshteinDistance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NSString+LevenshteinDistance

Version Platform

Description

This category adds one method to NSString:

  • (NSUInteger)levenshteinDistanceTo:(NSString *)otherString;

Usage

NSString *a = @"foo@bar.com";
NSString *b = @"foo@bar.con";
NSUInteger distance = [a levenshteinDistanceTo:b];
XCTAssert(distance == 1, @"distance == 1");

Installation

NSString+LevenshteinDistance is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "NSString+LevenshteinDistance"

Author

koyachi, rtk2106@gmail.com

License

NSString+LevenshteinDistance is available under the MIT license. See the LICENSE file for more info.

About

Levenshtein distance methods for NSString.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors