insert

Inserts the given element(s) or range at the given position into the array. Shifts the element currently at that position (if any) and any subsequent elements to the right.

T[]
insert
(
T
RangeOrElement...
)
(
T[] arr
,
size_t index
,
RangeOrElement r
)

Parameters

arr T[]

the array to insert the element(s) or range into

index size_t

the index at which the specified element(s) or range is to be inserted to

r RangeOrElement

the element(s) or range to be inserted

Return Value

Type: T[]

a copy of the given array with the element(s) or range inserted

Meta