BIS_fnc_removeIndex
Jump to navigation
Jump to search
Description
- Description:
- Takes an array, and returns a new array with the specified index(es) removed. This takes the array passed in the first parameter, and returns an array that has the index number in the second parameter removed. If a third parameter is passed, then a range of indexes will be removed. Alternatively, an array of indices to remove can be passed in the second parameter.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- [array, startIndex, endIndex] call BIS_fnc_removeIndex
- Parameters:
- array: Array
- startIndex: Number - start index to be removed, if Parameter 3 is not provided, only this index is removed
- endIndex: Number - (Optional, default Nothing) - end index, if provided the indexs from startIndex to endIndex will be removed
- Return Value:
- Array - new array with new values
Alternative Syntax
- Syntax:
- [array, indices] call BIS_fnc_removeIndex
- Parameters:
- array: Array
- indices: Array of Numbers - indices to be removed
- Return Value:
- Array - new array with new values
Examples
- Example 1:
- Example 2:
- Example 3:
Additional Information
- See also:
- deleteAt deleteRange
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note