• 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: Adding methods to NSString
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Adding methods to NSString


  • Subject: Re: Adding methods to NSString
  • From: Gregory Weston <email@hidden>
  • Date: Thu, 27 Nov 2003 06:57:23 -0500

On Nov 27, 2003, at 1:09, Frank wrote:

> I tried adding a category to NSString class to add a method which check
> if one string is contained within another (like contains statement in
> applescript).
>
> Problem is that the NSString object complains it doesn't recongnize the
> selector. Also the NSString object presents itself as being of the
> NSCFString class, which I believe is the problem. As I cannot find any
> reference to the NSCFString class (header files?) I cannot add a
> category to it.

But adding a category on its superclass should be sufficient.

>
> Is there any way out of this impasse (or am I just overlooking the
> obvious)?
>
- (NSRange)rangeOfString:(NSString*)s returns {NSNotFound, 0} if s is
not anywhere in the receiver.
_______________________________________________
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.

  • Prev by Date: Re: ZeroLink and dynamic discovered Classes
  • Next by Date: Re: Adding methods to NSString
  • Previous by thread: Re: Adding methods to NSString
  • Next by thread: Is it possible to interact with Microsoft Office X programmatically
  • Index(es):
    • Date
    • Thread