Re: localizedCompare: what's the locale?
Re: localizedCompare: what's the locale?
- Subject: Re: localizedCompare: what's the locale?
- From: Chuck Soper <email@hidden>
- Date: Wed, 6 Oct 2004 11:30:01 -0700
Nicko,
I'm interested in your question.
I searched for: NSString locale
at:
http://www.cocoabuilder.com
and found this:
http://www.cocoabuilder.com/archive/message/2002/2/8/14734
The answer to your question is unclear to me, but the email does say,
"comparison only done with respect to the user's preferred locale".
Perhaps, the localizedCompare: method will work properly if the
strings are initialized with initWithFormat:locale:.
Chuck
At 5:35 PM +0100 10/6/04, Nicko van Someren wrote:
The documentation for NSString's localizedCompare: says "Performs a
localized compare between the receiver and string. See Also: -
compare:options:range:locale:". Presumably it is simply calling
compare:options:range:locale: with some predefined values for
options, an empty range and a "local" locale. My question is where
does that locale come from? I want to do a localised search with
the NSNumericSearch option switched on, so I need to pass in the
same locale information.
Thanks in advance,
Nicko
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden