Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
- Subject: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
- From: "Stephen J. Butler" <email@hidden>
- Date: Sat, 05 May 2012 16:58:40 -0500
On Sat, May 5, 2012 at 4:46 PM, Markus Spoettl <email@hidden> wrote:
> On 05.05.12 23:07, Martin Wierschin wrote:
>>
>> So, when using a binary search, I get different answers depending on the
>> other strings in the list!
>
>
> Seems to work for me:
I was using F-Script to investigate this, but I'm seeing the same
thing (locale: en_US):
# a := {'aaa', 'laso', 'lasso', 'zzz'}
# 'laßt' localizedCaseInsensitiveCompare:@a
{1, -1, 1, -1}
Interestingly enough...
# 'laßt' localizedCompare:@a
{1, 1, 1, -1}
So if there's a bug, it appears to be in localizedCaseInsensitiveCompare:
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden