Ar InsertRange
From GECK
A function added by the New Vegas Script Extender.
Contents
Description
Similar to Ar_Insert, but allows for multiple new elements to be inserted at once. Inserts a range of elements into an Array-type array (list) at the specified index, provided the index is not greater than the current size of the array.
Elements above the insertion index are shifted up by the number of elements inserted. The range is itself passed as an Array, and each element of the range is inserted into the target Array in order.
Usable only with Array-type (regular/list) arrays. Note that this function modifies an array in place and returns a boolean, not a new array.
Syntax
(bool) Ar_InsertRange Array:array Index:int ToInsert:array
Example
array_var MyList array_var MyInsertion let MyList := Ar_List SunnyREF, CheyenneREF let MyInsertion := Ar_List Beer, Jet, Knife Ar_InsertRange MyList, 1, MyInsertion ; * MyList now contains: SunnyREF, Beer, Jet, Knife, CheyenneREF
See Also
- Ar_Insert (for single elements)
- Ar_Append
- Ar_Construct
- Ar_List
- Let
- Array Variables