Back to Aurora Vision Library Lite website
You are here: Start » 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 |
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 | |
---|---|---|---|---|---|
inArray | const Array<Type>& | Input array | |||
inStart | const int | 0 - | |||
inLength | Optional<int> | 0 - | NIL | ||
inInverse | bool | False | Determines if the indices are counted from beginning or from end of the input array | ||
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.