Back to FabImage Library website
You are here: Start » Function Reference » All Functions » Array Transforms » 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: | fil |
Module: | FoundationLite |
Selects a continuous subsequence of array elements.
Syntax
void fil::CropArray ( const ftl::Array<Type>& inArray, const int inStart, ftl::Optional<int> inLength, bool inInverse, ftl::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.