Re: Create an NSCharacterSet constant
Re: Create an NSCharacterSet constant
- Subject: Re: Create an NSCharacterSet constant
- From: Kyle Sluder <email@hidden>
- Date: Sun, 1 Nov 2009 21:59:59 -0800
On Sun, Nov 1, 2009 at 9:50 PM, John Joyce
<email@hidden> wrote:
> Category, yeah, that's totally one way I thought about, but I was thinking
> more of an enhancement request in Radar. I figured the nature of it
> inheriting from NSObject implies there are some kind of optimizations under
> the hood (otherwise we'd just use NSString and NSScanner right?).
An NSCharacterSet embodies the concept of "a set of characters." An
NSString and NSScanner pair embodies the concept of "how I'm gonna
find some characters in a string." The first is a value type, the
second an implementation detail. NSCharacterSets are also useful for
other things than just finding them in a string or other stream of
data.
> Seems like a useful one considering the characterSetWithCharactersInString:
> method. Even if it were some sort of singleton class. Particularly useful in
> input validation routines (things like highly structured serial numbers and
> other identifiers, etc...)
I'm confused about what enhancement could be made that would not be
highly specific to your application.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden