• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >inconsistent behavior of NSString's localizedCaseInsensitiveCompare (From: Martin Wierschin <email@hidden>)
 >Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare (From: Markus Spoettl <email@hidden>)

  • Prev by Date: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Next by Date: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Previous by thread: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Next by thread: Re: inconsistent behavior of NSString's localizedCaseInsensitiveCompare
  • Index(es):
    • Date
    • Thread