Type of the inserted value(s) (single value, range or static array).
Range originally obtained from this array.
Value(s) should be inserted.
The number of elements inserted.
Precondition: r refers to a region of $(D_KEYWORD this).
Array!int v1; v1.insertAfter(v1[], [2, 8]); assert(v1[0] == 2); assert(v1[1] == 8); assert(v1.length == 2); v1.insertAfter(v1[], [1, 2]); assert(v1[0] == 2); assert(v1[1] == 8); assert(v1[2] == 1); assert(v1[3] == 2); assert(v1.length == 4); v1.insertAfter(v1[0 .. 0], [1, 2]); assert(v1[0] == 1); assert(v1[1] == 2); assert(v1[2] == 2); assert(v1[3] == 8); assert(v1[4] == 1); assert(v1[5] == 2); assert(v1.length == 6); v1.insertAfter(v1[0 .. 4], 9); assert(v1[0] == 1); assert(v1[1] == 2); assert(v1[2] == 2); assert(v1[3] == 8); assert(v1[4] == 9); assert(v1[5] == 1); assert(v1[6] == 2); assert(v1.length == 7);
Array!int v1; v1.insertBefore(v1[], [2, 8]); assert(v1[0] == 2); assert(v1[1] == 8); assert(v1.length == 2); v1.insertBefore(v1[], [1, 2]); assert(v1[0] == 1); assert(v1[1] == 2); assert(v1[2] == 2); assert(v1[3] == 8); assert(v1.length == 4); v1.insertBefore(v1[0 .. 1], [1, 2]); assert(v1[0] == 1); assert(v1[1] == 2); assert(v1[2] == 1); assert(v1[3] == 2); assert(v1[4] == 2); assert(v1[5] == 8); assert(v1.length == 6); v1.insertBefore(v1[2 .. $], 9); assert(v1[0] == 1); assert(v1[1] == 2); assert(v1[2] == 9); assert(v1[3] == 1); assert(v1[4] == 2); assert(v1[5] == 2); assert(v1[6] == 8); assert(v1.length == 7);
Inserts el before or after r.