• 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: What can I do with an NSRange in Objective-C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >are there any custom IB Palettes? (From: ayyapu <email@hidden>)
 >What can I do with an NSRange in Objective-C? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: Cocoa wizard & gurus, Help!!
  • Next by Date: NSSearchField with menu and cancel button
  • Previous by thread: Re: What can I do with an NSRange in Objective-C?
  • Next by thread: Re: are there any custom IB Palettes?
  • Index(es):
    • Date
    • Thread