Re: String comparison newbie question
Re: String comparison newbie question
- Subject: Re: String comparison newbie question
- From: Andrew Farmer <email@hidden>
- Date: Sat, 18 Nov 2006 01:40:40 -0800
On 18 Nov 06, at 01:29, Carl Johan Foss wrote:
I am trying to search a string to find a word in a string. I am
using the comparison method but for some reason it does not work.
-[NSString compare:options:] is for testing two strings to see how
they should be sorted. It returns NSOrderedSame, NSOrderedAscending,
or NSOrderedDescending, depending on how the two strings should be
ordered.
For case-insensitive searching, use -[NSString
rangeOfString:options:]. NSScanner is overkill for this task.
_______________________________________________
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