CFArraySortValues

Header: CFArray.h Carbon status: Supported

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

void CFArraySortValues (
    CFMutableArrayRef theArray, 
    CFRange range, 
    CFComparatorFunction comparator, 
    void *context
);
Parameter descriptions
theArray

The array whose values are to be sorted. If this parameter is not a valid mutable CFArray, the behavior is undefined.

range

The range of values within the array to sort. If the range location or end point (defined by the location plus length minus 1) are outside the index space of the array (0 to N-1 inclusive, where N is the count of the array), the behavior is undefined. If the range length is negative, the behavior is undefined. The range may be empty (length 0).

comparator

The function with the comparator function type signature which is used in the sort operation to compare values in the array with the given value. If this parameter is not a pointer to a function of the correct prototype, the the behavior is undefined. If there are values in the array which the comparator function does not expect or cannot properly compare, the behavior is undefined. The values in the range are sorted from least to greatest according to this function.

context

A pointer-sized user-defined value, which is passed as the third parameter to the comparator function, but is otherwise unused by this function. If the context is not what is expected by the comparator function, the behavior is undefined.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later.


© 2000 Apple Computer, Inc. (Last Updated 6/30/2000)