Back to FabImage Library website
You are here: Start » Function Reference » All Functions » Array Composition » FisFilter_InsertToArray
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: | fis |
Module: | FoundationLite |
Inserts a new element to an array at a specified location.
Syntax
void fis::FisFilter_InsertToArray ( ftl::Array<Type>& ioArray, const Type& inValue, int inIndex, bool inInverse )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
ioArray | Array<Type>& | |||
![]() |
inValue | const Type& | Input value to be inserted | ||
![]() |
inIndex | int | 0 - ![]() |
Input index within the inArray at which the inValue will be placed | |
![]() |
inInverse | bool | False | Determines if the indices are counted from beginning or from end of the input array |
Examples
![]() |
![]() |
inArray = {1,2,3,4,5} inIndex = 1 inValue = 10 |
outArray = {1,10,2,3,4,5} |
![]() |
![]() |
inArray = {1,2,3,4,5} inIndex = 5 inValue = 10 |
outArray = {1,2,3,4,5,10} |
Errors
List of possible exceptions:
Error type | Description |
---|---|
DomainError | Index out of range in InsertToArray. |
See Also
- FisFilter_InsertArrayToArray – Inserts an array at the specified index of another array.
- FisFilter_AppendToArray – Inserts a new element at the end of an array.