Array.insertFront

Append element to the start.

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

Examples

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

arr.insertFront(1);
arr.insertBack(2);
arr.insertFront(0);
assert(arr.data == [0,1,2]);

Meta