Aurora Visio Studio TOP » Filter Reference » Array » Array Transforms » SplitArray

SplitArray


Module: FoundationLite

Divides an array into two parts at the given index.

Name Type Range Description
Input value
inArray <T>Array Input array
Input value
inIndex Integer 0 - Index of the first element that is passed to the second of the output arrays
Input value
inInverse Bool Determines if the indices are counted from beginning or from end of the input array
Output value
outArray1 <T>Array First output array
Output value
outArray2 <T>Array Second output array

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

Description

The operation divides the inArray into two parts. The elements on positions smaller than inIndex are passed to outArray1, while the remaining ones are passed to outArray2. The index numbering in Aurora Vision Studio is zero-based.

Examples

inArray = {1,4,3,2,5}
inIndex = 3
outArray1 = {1,4,3}
outArray2 = {2,5}

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 SplitArray.

Complexity Level

This filter is available on Basic Complexity Level.

See Also

  • JoinArrays – Concatenates the input arrays one after another.
  • CropArray – Selects a continuous subsequence of array elements.