Functions Index :: A :: ArrayInsRange

[<< up one level]


array :: slices


ArrayInsRange(string array, string newval_array, int "index")


Inserts the elements of newval_array before array[index] and returns the resulting array.

As a result the array is expanded, newval_array's elements are positioned at array[index] - array[index + ArrayLen(newval_array) - 1] and all subsequent elements's indexes are increased by ArrayLen(newval_array).

If (optional) index is ommited, then newval_array's elements are appended to the end of array (same as providing an index with value equal to array.ArrayLen()).


a1 = ArrayCreate(AVISource(.1.), AVISource(.2.), , AVISource(.3.))

a2 = ArrayCreate(AVISource(.4.), AVISource(.5.))

a3 = a1.ArrayInsRange(a2, 1)

# a3 now contains clips {(.1.),(.4.),(.5.),(.2.),(.3.)}

a4 = a1.ArrayInsRange(a2)

# a4 now contains clips {(.1.),(.2.),(.3.),(.4.),(.5.)}


[<< top]