This category adds one method to NSString:
- (NSUInteger)levenshteinDistanceTo:(NSString *)otherString;
NSString *a = @"foo@bar.com";
NSString *b = @"foo@bar.con";
NSUInteger distance = [a levenshteinDistanceTo:b];
XCTAssert(distance == 1, @"distance == 1");
NSString+LevenshteinDistance is available through CocoaPods, to install it simply add the following line to your Podfile:
pod "NSString+LevenshteinDistance"
koyachi, rtk2106@gmail.com
NSString+LevenshteinDistance is available under the MIT license. See the LICENSE file for more info.