NSCharacterSet

NSCharacterSet Mac OS X 10.0

A character set represents a collection of Unicode characters. An instance of NSCharacterSet is a static entity; NSCharacterSet's subclass NSMutableCharacterSet defines an interface to a dynamic set of Unicode characters.

NSCharacterSet is toll-free bridged with the Core Foundation type CFCharacterSet. As such, NSCharacterSet objects can be used interchangeably with the CFCharacterSet pointer type, CFCharacterSetRef.

figs/cocn_1313.gif

@interface NSCharacterSet : NSObject <NSCoding, NSCopying, NSMutableCopying>
 // Class Methods
   + (NSCharacterSet *)alphanumericCharacterSet;
   + (NSCharacterSet *)capitalizedLetterCharacterSet;
   + (NSCharacterSet *)characterSetWithBitmapRepresentation:(NSData *)data;
   + (NSCharacterSet *)characterSetWithCharactersInString:(NSString *)aString;
   + (NSCharacterSet *)characterSetWithContentsOfFile:(NSString *)fName;
   + (NSCharacterSet *)characterSetWithRange:(NSRange)aRange;
   + (NSCharacterSet *)controlCharacterSet;
   + (NSCharacterSet *)decimalDigitCharacterSet;
   + (NSCharacterSet *)decomposableCharacterSet;
   + (NSCharacterSet *)illegalCharacterSet;
   + (NSCharacterSet *)letterCharacterSet;
   + (NSCharacterSet *)lowercaseLetterCharacterSet;
   + (NSCharacterSet *)nonBaseCharacterSet;
   + (NSCharacterSet *)punctuationCharacterSet;
   + (NSCharacterSet *)uppercaseLetterCharacterSet;
   + (NSCharacterSet *)whitespaceAndNewlineCharacterSet;
   + (NSCharacterSet *)whitespaceCharacterSet;
 // Instance Methods
   - (NSData *)bitmapRepresentation;
   - (BOOL)characterIsMember:(unichar)aCharacter;
   - (BOOL)hasMemberInPlane:(uint8_t)thePlane;
   - (NSCharacterSet *)invertedSet;
   - (BOOL)isSupersetOfSet:(NSCharacterSet *)theOtherSet;
   - (BOOL)longCharacterIsMember:(UTF32Char)theLongChar;
 // Methods Implementing NSCoding
   - (void)encodeWithCoder:(NSCoder *)aCoder;
   - (id)initWithCoder:(NSCoder *)aDecoder;
 // Methods Implementing NSCopying
   - (id)copyWithZone:(NSZone *)zone;
 // Methods Implementing NSMutableCopying
   - (id)mutableCopyWithZone:(NSZone *)zone;

Subclasses

NSMutableCharacterSet



    Part II: API Quick Reference
    Chapter 13. Foundation Classes