Back to Aurora Vision Library website

You are here: Start » Function Reference » All Functions » Array Transforms » CropArray

CropArray


This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.

Header: STD.h
Namespace: avl
Module: FoundationLite

Selects a continuous subsequence of array elements.

Syntax

void avl::CropArray
(
	const atl::Array<Type>& inArray,
	const int inStart,
	atl::Optional<int> inLength,
	bool inInverse,
	atl::Array<Type>& outCroppedArray
)

Parameters

Name Type Range Default Description
Input value inArray const Array<Type>& Input array
Input value inStart const int 0 -
Input value inLength Optional<int> 0 - NIL
Input value inInverse bool False Determines if the indices are counted from beginning or from end of the input array
Output value outCroppedArray Array<Type>& Cropped array

Examples

inArray = {2,4,3,2,5}
inStart = 1
inLength = 3
outCroppedArray = {4,3,2}

Errors

List of possible exceptions:

Error type Description
DomainError inLength negative in CropArray
DomainError inStart negative in CropArray

See Also

  • SplitArray – Divides an array into two parts at the given index.