Inserts at a given index in the slice while dropping its last element.
Basically a macro for
slice[index .. $].shiftRight(1); slice[index] = x;
static int[] a = [ 1, 2, 4, 5 ]; a.shift(2, 3); assert(a[0] == 1); assert(a[1] == 2); assert(a[2] == 3); assert(a[3] == 4);
Inserts at a given index in the slice while dropping its last element.
Basically a macro for