Function

CFArrayExchangeValuesAtIndices

Exchanges the values at two indices of an array.

Declaration

void CFArrayExchangeValuesAtIndices(CFMutableArrayRef theArray, CFIndex idx1, CFIndex idx2);

Parameters

theArray

The array that contains the values to be swapped.

idx1

The index of the value to swap with the value at idx2. The index must not exceed the index space of theArray (0 to N-1 inclusive, where N is the count of theArray before the operation).

idx2

The index of the value to swap with the value at idx1. The index must not exceed the index space of theArray (0 to N-1 inclusive, where N is the count of theArray before the operation).

See Also

CFMutableArray Miscellaneous Functions

CFArrayAppendArray

Adds the values from one array to another array.

CFArrayAppendValue

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

CFArrayCreateMutable

Creates a new empty mutable array.

CFArrayCreateMutableCopy

Creates a new mutable array with the values from another 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