- Inherits from:
- NSCharacterSet : NSObject
- Conforms to:
- NSCopying
- NSMutableCopying
- NSCoding (NSCharacterSet)
- NSObject (NSObject)
Declared in:
- Foundation/NSCharacterSet.h
The NSMutableCharacterSet class declares the programmatic interface to objects that manage a modifiable set of Unicode characters. You can add or remove characters from a mutable character set as numeric values in NSRanges or as character values in strings; combine character sets by union or intersection; and invert a character set.
Mutable character sets are less efficient to use than immutable character sets. If you don't need to change a character set after creating it, create an immutable copy with copy and use that.
NSMutableCharacterSet defines no primitive methods. Subclasses must implement all methods declared by this class in addition to the primitives of NSCharacterSet. They must also implement mutableCopyWithZone:.
- Adding and removing characters
- - addCharactersInRange:
- - removeCharactersInRange:
- - addCharactersInString:
- - removeCharactersInString:
- Combining character sets
- - formIntersectionWithCharacterSet:
- - formUnionWithCharacterSet:
- Inverting a character set
- - invert
- (void)addCharactersInRange:(NSRange)aRange
See Also: - removeCharactersInRange:, - addCharactersInString:
- (void)addCharactersInString:(NSString
*)aString
See Also: - removeCharactersInString:, - addCharactersInRange:
- (void)formIntersectionWithCharacterSet:(NSCharacterSet
*)otherSet
See Also: - formUnionWithCharacterSet:
- (void)formUnionWithCharacterSet:(NSCharacterSet
*)otherSet
See Also: - formIntersectionWithCharacterSet:
- (void)invert
See Also: - invertedSet (NSCharacterSet)
- (void)removeCharactersInRange:(NSRange)aRange
See Also: - addCharactersInRange:, - removeCharactersInString:
- (void)removeCharactersInString:(NSString
*)aString
See Also: - addCharactersInString:, - removeCharactersInRange: