On Jul 20, 2010, at 10:39 AM, Roland King wrote:
I thought perhaps that comparing the two strings case insensitively,
returning that compare if they are not equal, but if they are equal,
comparing them case sensitively and returning the inverse of that (remember I
want a to beat A) would
You should be able to accomplish what you want using NSPredicate.
You can also use the C functions topper and tolower to detect and distinguish
case differences.
On Jul 20, 2010, at 1:39 PM, Roland King wrote:
I want to sort some NSStrings in such a way that words group case
insensitively,
On Tue, Jul 20, 2010 at 11:04 AM, Charlie Dickman 3tothe...@comcast.net wrote:
You should be able to accomplish what you want using NSPredicate.
NSPredicate will just wind up falling through to the same sorting
methods Roland can call directly.
You can also use the C functions topper and
On Jul 20, 2010, at 11:39 AM, Roland King wrote:
I thought perhaps that comparing the two strings case insensitively,
returning that compare if they are not equal, but if they are equal,
comparing them case sensitively and returning the inverse of that (remember I
want a to beat A) would
NB:
1. Standard ordering for most languages is capitals before lowercase.
2. Some languages have lowercase first.
3. -localizedStandardCompare: will take care of this for you.
In general, it’s better to leave decisions like this to the system.
Sorts of lists to be shown to end-users should
aAbBcCdDeEfF .. etc with everything outside the letter space sorting
'naturally' and coming after the letters (I actually don't care too much about
the last bit honestly they can go where they like as long as it's outside the
alphabet range).
so
myClass comes before