localizedCaseInsensitiveCompare: equivalent to:
[aString compare:otherString
options:NSCaseInsensitiveSearch
range:NSMakeRange(0,aString.length)
locale:[NSLocale currentLocale]];
localizedStandardCompare: basically equivalent to:
[aString compare:otherString
options:NSCaseInsensitiveSearch | NSNumericSearch
range:NSMakeRange(0,aString.length)
locale:[NSLocale currentLocale]];
So, the main difference is how the numbers inside the strings are compared.
Comparing the following three lines using localizedCaseInsensitiveCompare:will result in the following order:
"Foo2.txt",
"Foo25.txt",
"Foo7.txt"
On the other hand, comparing them using localizedStandardCompare:will lead to the following order:
"Foo2.txt",
"Foo7.txt",
"Foo25.txt"
localizedCaseInsensitiveCompare: , localizedStandardCompare: (OS X 10.6). Finder , localizedStandardCompare: , , Finder.
, , , , , localizedStandardCompare:.