CFArrayReplaceValues(_:_:_:_:)
Replaces a range of values in an array.
Declaration
func CFArrayReplaceValues(_ theArray: CFMutableArray!, _ range: CFRange, _ newValues: UnsafeMutablePointer<UnsafeRawPointer?>!, _ newCount: CFIndex)Parameters
- theArray:
The array in which some values are to be replaced. If this parameter is not a valid CFMutableArray object, the behavior is undefined.
- range:
The range of values within
theArrayto replace. The range location or end point (defined by the location plus length minus 1) must not lie outside the index space oftheArray(0toN-1inclusive, whereNis the count oftheArray). The range length must not be negative. 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
theArray. The new values intheArrayare ordered in the same order in which they appear in this C array. This parameter may beNULLif thenewCountparameter 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 leastnewCountpointers, the behavior is undefined. - newCount:
The number of values to copy from the
newValuesC array intotheArray. If this parameter is different from the range length, the excessnewCountvalues are inserted after the range or the excess range values are deleted. This parameter may be 0, in which case no new values are replaced intotheArrayand the values in the range are simply removed. If this parameter is negative or greater than the number of values actually in thenewValuesC array, the behavior is undefined.