BIS fnc removeIndex: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " \| *(\[[a-zA-Z,. ]*\] call ('''|\[\[)?BI(N|S)_fnc_[a-zA-Z]+('''|\]\])?) * \|p1=" to " |s1=$1 |p1=")
m (Text replacement - " \| *([^= ]+) * +\|s2=" to " |r1=$1 |s2=")
Line 35: Line 35:
|p3=endIndex: [[Number]] - (Optional, default [[Nothing]]) -  End index, if provided the indexs from startIndex to endIndex will be removed
|p3=endIndex: [[Number]] - (Optional, default [[Nothing]]) -  End index, if provided the indexs from startIndex to endIndex will be removed


| [[Array]] - New array with new values
|r1= [[Array]] - New array with new values


|s2= [array,indexes] call [[BIS_fnc_removeIndex]]
|s2= [array,indexes] call [[BIS_fnc_removeIndex]]

Revision as of 01:19, 13 June 2021

Hover & click on the images for description

Description

Description:
Description needed
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 isn't 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,indexes] call BIS_fnc_removeIndex
Parameters:
array: Array
indexes: Array of numbers - Indexes to be removed
Return Value:
Array - New array with new values

Examples

Example 1:
_array = [0,1,2,3,4]; [array,0] call BIS_fnc_removeIndex;//Returns [1,2,3,4]
Example 2:
_array = [0,1,2,3,4]; [array,0,4] call BIS_fnc_removeIndex;//Returns []
Example 3:
_array = [0,1,2,3,4]; [array,[0,4]] call BIS_fnc_removeIndex;//Returns [1,2,3]

Additional Information

See also:
deleteAtdeleteRange

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