Back to Adaptive Vision Studio website

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

RemoveRangeFromArray


Module: FoundationLite

Removes elements at the given indices from the input array.

Name Type Range Description
ioArray <T>Array
inStart Integer 0 - Index of the first element to be removed
inLength Integer* 0 - Number of elements to be removed
inInverse Bool Determines if the indices are counted from beginning or from end of the input array

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

Description

The operation removes a range of elements from inArray. Removed are the elements at indices from inStart to inStart + inLength - 1.

Examples

inArray = {6,7,3,4,10}
inStart = 1
inLength = 2
outArray = {6,4,10}

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 RemoveRangeFromArray.
DomainError Negative inLength in RemoveRangeFromArray.
DomainError Negative inStart in RemoveRangeFromArray.

Complexity Level

This filter is available on Advanced Complexity Level.

See Also

  • RemoveValueFromArray – Removes the first or all of the elements of the given value from an array.