iphone Programming Glossary: andof
Calculate number of differences between two NSStrings http://stackoverflow.com/questions/2397348/calculate-number-of-differences-between-two-nsstrings them each as a single word float compareWithWord NSString stringB return the minimum of a b and c int smallestOf int a andOf int b andOf int c @end NSString Levenshtein.m Created by Rick Bourner on Sat Aug 09 2003. Rick@Bourner.com #import NSString.. a single word float compareWithWord NSString stringB return the minimum of a b and c int smallestOf int a andOf int b andOf int c @end NSString Levenshtein.m Created by Rick Bourner on Sat Aug 09 2003. Rick@Bourner.com #import NSString Levenshtein.h.. i 1 stringB characterAtIndex j 1 cost 0 else cost 1 Step 6 d j n i self smallestOf d j 1 n i 1 andOf d j n i 1 1 andOf d j 1 n i 1 cost distance d n m 1 free d return distance return 0.0 return the minimum of a b and c..
|