Back to Adaptive Vision Studio website

You are here: Start » Filter Reference » Array Composition » InsertArrayToArray

InsertArrayToArray


Inserts an array at the specified index of another one.

Name Type Range Description
ioArray <T>Array
inInsertedArray <T>Array Input array to be inserted
inIndex Integer 0 - Input index within the inArray at which the first element of the inInsertedArray will be placed
inInverse Bool Reversed order in the array

The type of this filter is defined using the type variable T which represents any valid type. Read more.

Examples

inArray = {1,2,3,4,5}
inInsertedArray = {10,9}
inIndex = 1
outArray = {1,10,9,2,3,4,5}
inArray = {1,2,3,4,5}
inInsertedArray = {10,9}
inIndex = 5
outArray = {1,2,3,4,5,10,9}

Errors

This filter can throw an exception to report error. Read how to deal with errors in Error Handling.

List of possible exceptions:

Error type Description
DomainError Index out of range in InsertArrayToArray.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • FlattenArray – Receives an array of arrays, and creates a single one-dimensional array containing all individual elements.
  • InsertToArray – Inserts a new element to an array at a specified location.