String comparison for localization
问题 What is the difference between NSString 's localizedCaseInsensitiveCompare: and localizedStandardCompare: methods? I read the reference but did not get a proper idea of which one to use. 回答1: localizedCaseInsensitiveCompare: is equivalent to: [aString compare:otherString options:NSCaseInsensitiveSearch range:NSMakeRange(0,aString.length) locale:[NSLocale currentLocale]]; localizedStandardCompare: is basically equivalent to: [aString compare:otherString options:NSCaseInsensitiveSearch |