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 do what I want but I've failed to convince myself 
> that actually works. 

This approach will not provide overall lower-before-capital sorting, so I 
expect it won't work. Consider the following:

aClass
AAClass

Will sort, using the method you describe, to 

AAClass
aClass

Because A comes before C and they are unequal (so a is never compared to A). 
Using a custom selector/function is probably the only way to go, and I can't 
think of any built-in method that will give the collation results you are 
looking for. I don't think you can escape a character-by-character comparison.

HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to