| Derived from | |
| Framework | CoreFoundation/CoreFoundation.h |
| Companion guide | |
| Declared in | CFCharacterSet.h |
CFMutableCharacterSet manages dynamic character sets. The basic interface for managing character sets is provided by CFCharacterSet. CFMutableCharacterSet adds functions to modify the contents of a character set.
You create a mutable character set object using either the CFCharacterSetCreateMutable or CFCharacterSetCreateMutableCopy function.
CFMutableCharacterSet is “toll-free bridged” with its Cocoa Foundation counterpart, NSMutableCharacterSet. This means that the Core Foundation type is interchangeable in function or method calls with the bridged Foundation object. Therefore, in a method where you see an NSMutableCharacterSet * parameter, you can pass in a CFMutableCharacterSetRef, and in a function where you see a CFMutableCharacterSetRef parameter, you can pass in an NSMutableCharacterSet instance. This capability also applies to concrete subclasses of NSMutableCharacterSet. See Interchangeable Data Types for more information on toll-free bridging.
Adds a given range to a character set.
void CFCharacterSetAddCharactersInRange ( CFMutableCharacterSetRef theSet, CFRange theRange );
The character set to modify.
The range to add to the character set. The range is specified in 32-bits in UTF-32 format, and must lie within the valid Unicode character range (from 0x00000 to 0x10FFFF).
CFCharacterSet.h
Adds the characters in a given string to a character set.
void CFCharacterSetAddCharactersInString ( CFMutableCharacterSetRef theSet, CFStringRef theString );
The character set to modify.
A string containing the characters to add to theSet.
CFCharacterSet.h
Creates a new empty mutable character set.
CFMutableCharacterSetRef CFCharacterSetCreateMutable ( CFAllocatorRef alloc );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
A new empty mutable character set. Ownership follows the Create Rule.
CFCharacterSet.h
Creates a new mutable character set with the values from another character set.
CFMutableCharacterSetRef CFCharacterSetCreateMutableCopy ( CFAllocatorRef alloc, CFCharacterSetRef theSet );
The allocator to use to allocate memory for the new object. Pass NULL or kCFAllocatorDefault to use the current default allocator.
The character set to copy.
A new mutable character set containing the same characters as theSet. Ownership follows the Create Rule.
CFCharacterSet.h
Forms an intersection of two character sets.
void CFCharacterSetIntersect ( CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet );
The source character set, modified by intersection with theOtherSet.
The character set with which the intersection is formed.
CFCharacterSet.h
Inverts the content of a given character set.
void CFCharacterSetInvert ( CFMutableCharacterSetRef theSet );
The character set to invert.
CFCharacterSet.h
Removes a given range of Unicode characters from a character set.
void CFCharacterSetRemoveCharactersInRange ( CFMutableCharacterSetRef theSet, CFRange theRange );
The character set to modify.
The range to remove from the character set. The range is specified in 32-bits in UTF-32 format, and must lie within the valid Unicode character range (from 0x00000 to 0x10FFFF).
CFCharacterSet.h
Removes the characters in a given string from a character set.
void CFCharacterSetRemoveCharactersInString ( CFMutableCharacterSetRef theSet, CFStringRef theString );
The character set to modify.
A string containing the characters to remove from theSet.
CFCharacterSet.h
Forms the union of two character sets.
void CFCharacterSetUnion ( CFMutableCharacterSetRef theSet, CFCharacterSetRef theOtherSet );
The source character set, modified by union with theOtherSet.
The character set with which the union is formed.
CFCharacterSet.hA reference to a mutable character set object.
typedef struct __CFCharacterSet *CFMutableCharacterSetRef;
CFCharacterSet.h
Last updated: 2005-12-06