Function

CFArrayAppendValue

Adds a value to an array giving it the new largest index.

Declaration

void CFArrayAppendValue(CFMutableArrayRef theArray, const void *value);

Parameters

theArray

The array to which value is to be added. If theArray is a limited-capacity array and it is full before this operation, the behavior is undefined.

value

A CFType object or a pointer value to add to theArray.

Discussion

The value parameter is retained by theArray using the retain callback provided when theArray was created. If value is not of the type expected by the retain callback, the behavior is undefined. The value parameter is assigned to the index one larger than the previous largest index and the count of theArray is increased by one.

See Also

CFMutableArray Miscellaneous Functions

CFArrayAppendArray

Adds the values from one array to another array.

CFArrayCreateMutable

Creates a new empty mutable array.

CFArrayCreateMutableCopy

Creates a new mutable array with the values from another array.

CFArrayExchangeValuesAtIndices

Exchanges the values at two indices of an array.

CFArrayInsertValueAtIndex

Inserts a value into an array at a given index.

CFArrayRemoveAllValues

Removes all the values from an array, making it empty.

CFArrayRemoveValueAtIndex

Removes the value at a given index from an array.

CFArrayReplaceValues

Replaces a range of values in an array.

CFArraySetValueAtIndex

Changes the value at a given index in an array.

CFArraySortValues

Sorts the values in an array using a given comparison function.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software