Array.insertFront

Append all elements of slice s to the start.

  1. void insertFront(T c)
  2. void insertFront(const(T)[] s)
    struct Array(T, size_t chunkSize = 32)
    void
    insertFront
    (
    const(T)[] s
    )

Examples

Array!int arr;
scope(exit) arr.free();

arr.insertFront([5,6,7,8]);
assert(arr.data == [5,6,7,8]);
arr.insertFront([1,2,3,4]);
assert(arr.data == [1,2,3,4,5,6,7,8]);

Meta