Re: What can I do with an NSRange in Objective-C?
Re: What can I do with an NSRange in Objective-C?
- Subject: Re: What can I do with an NSRange in Objective-C?
- From: Finlay Dobbie <email@hidden>
- Date: Wed, 11 Feb 2004 22:01:06 +0000
On 8 Feb 2004, at 22:57, email@hidden wrote:
NSRange aRange = [someString rangeOfString:@"The String"];
if(aRange.length){
// Do stuff
}
or use the location
int loc = aRange.location;
if (aRange.location != NSNotFound) is the recommended way of checking
that, i think
-- Finlay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.