Re: Adding methods to NSString
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.