CFMutableBitVector objects manage dynamic bit vectors. The basic interface for managing bit vectors is provided by CFBitVector. CFMutableBitVector adds functions to modify the contents of a bit vector.

You create a mutable bit vector object using either the CFBitVectorCreateMutable(_:_:) or CFBitVectorCreateMutableCopy(_:_:_:) function. You add to and remove from a bit vector by altering the size of the bit vector with the CFBitVectorSetCount(_:_:) function


Creating a CFMutableBitVector Object

Modifying a Bit Vector

func CFBitVectorFlipBits(CFMutableBitVector!, CFRange)

Flips a range of bit values in a bit vector.

func CFBitVectorSetAllBits(CFMutableBitVector!, CFBit)

Sets all bits in a bit vector to a particular value.

func CFBitVectorSetBitAtIndex(CFMutableBitVector!, CFIndex, CFBit)

Sets the value of a particular bit in a bit vector.

func CFBitVectorSetBits(CFMutableBitVector!, CFRange, CFBit)

Sets a range of bits in a bit vector to a particular value.

func CFBitVectorSetCount(CFMutableBitVector!, CFIndex)

Changes the size of a mutable bit vector.

Data Types

class CFMutableBitVector

A reference to a mutable bit vector object.

See Also

Opaque Types


The CFFileDescriptor provides an opaque type to monitor file descriptors for read and write activity via CFRunLoop.


CFStringTokenizer allows you to tokenize strings into words, sentences or paragraphs in a language-neutral way. It supports languages such as Japanese and Chinese that do not delimit words by spaces, as well as de-compounding German compounds. You can obtain Latin transcription for tokens. It also provides language identification API.