BIS fnc arrayInsert: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " +" to " ")
m (Text replacement - " \| *(\[[^ ]+\] (call|spawn) ('''|\[\[)BI(N|S)_fnc_[a-zA-Z0-9_]+('''|\]\]));? \| *p1 *=" to " |s1=$1 |p1=")
Line 17: Line 17:
| Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned.
| Inserts the elements of one array into another, at a specified index. Neither arrays are touched by reference, a new array is returned.


| [array1, array2, index] call [[BIS_fnc_arrayInsert]]
|s1=[array1, array2, index] call [[BIS_fnc_arrayInsert]]


|p1= array1: [[Array]] - array to insert into
|p1= array1: [[Array]] - array to insert into

Revision as of 20:30, 12 June 2021

Hover & click on the images for description

Description

Description:
Description needed
Execution:
call
Groups:
Arrays

Syntax

Syntax:
[array1, array2, index] call BIS_fnc_arrayInsert
Parameters:
array1: Array - array to insert into
array2: Array - array to be inserted
index: Number - insertion index
Return Value:
Array - a new array

Examples

Example 1:
_result = [[0,1,2,3,4], ["a","b","c"], 1] call BIS_fnc_arrayInsert; // returns [0,"a","b","c",1,2,3,4]

Additional Information

See also:
See also needed

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