CocoaDev

Edit AllPages

This is a simple category on NSString to allow comparisons using the Soundex algorithm. This compares a string by the way it sounds, i.e. phonetically. It can be quite handy for suggesting alternative words for example, or doing fuzzy matches, book indexing, etc. GrahamCox.

#import <Cocoa/Cocoa.h>

@interface NSString (Soundex)

@end

#import “NSString+Soundex.h”

@implementation NSString (Soundex)

static NSArray* soundexCharSets = nil;

@end