• 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: Chris Hanson <email@hidden>
  • Date: Thu, 27 Nov 2003 19:24:14 -0600

On Nov 26, 2003, at 4:53 PM, 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).

BOOL b = [@"foo" isCaseInsensitiveLike:@"*o*"];

b should be YES.

In other words, you shouldn't need to create a category to do this. However, categories on NSString should Just Work.

-- Chris

PS - The documentation for operations like isLike:, isCaseInsensitiveLike: and isEqualTo: is under the documentation for the NSComparisonMethods informal protocol. They're very handy; I used them in the implementation of BDQualifier in my BDControl framework.

--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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: 
 >Adding methods to NSString (From: Frank <email@hidden>)

  • Prev by Date: prebinding disabled because time stamp
  • Next by Date: Using gcc
  • Previous by thread: Re: Adding methods to NSString
  • Next by thread: Re: Adding methods to NSString
  • Index(es):
    • Date
    • Thread