CFArrayInsertValueAtIndex(_:_:_:)
Inserts a value into an array at a given index.
Declaration
func CFArrayInsertValueAtIndex(_ theArray: CFMutableArray!, _ idx: CFIndex, _ value: UnsafeRawPointer!)Parameters
- theArray:
The array into which
valueis inserted. IftheArrayis a fixed-capacity array and it is full before this operation, the behavior is undefined. - idx:
The index at which to insert
value. The index must be in the range0toNinclusive, whereNis the count oftheArraybefore the operation. If the index is the same as the count oftheArray, this function has the same effect as Cfarrayappendvalue(_:_:). - value:
The value to insert into
theArray. The value is retained bytheArrayusing the retain callback provided whentheArraywas created. Ifvalueis not of the type expected by the retain callback, the behavior is undefined.
Discussion
The value parameter is assigned to the index idx, and all values in theArray with equal and larger indices have their indices increased by one.