CFArrayReplaceValues

Header: CFArray.h Carbon status: Supported

Replaces a range of values in the array.

void CFArrayReplaceValues (
    CFMutableArrayRef theArray, 
    CFRange range, 
    void **newValues, 
    CFIndex newCount
);
Parameter descriptions
theArray

The array from which all of the values are to be removed. If this parameter is not a valid mutable CFArray, the behavior is undefined.

range

The range of values within the array to replace. 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 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), in which case the new values are merely inserted at the range location.

newValues

A C array of the pointer-sized values to be placed into the array. The new values in the array are ordered in the same order in which they appear in this C array. This parameter may be NULL if the newCount parameter is 0. This C array is not changed or freed by this function. If this parameter is not a valid pointer to a C array of at least newCount pointers, the behavior is undefined.

newCount

The number of values to copy from the values C array into the CFArray. If this parameter is different than the range length, the excess newCount values will be inserted after the range, or the excess range values will be deleted. This parameter may be 0, in which case no new values are replaced into the array and the values in the range are simply removed. If this parameter is negative, or greater than the number of values actually in the newValues C array, 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)