Array.insertBack

Append single element c to the end.

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

Examples

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

foreach(i; 0..16) {
    arr.insertBack(i);
}
assert(arr.length == 16);
arr.insertBack(16);
assert(arr.length == 17);
assert(arr[16] == 16);

Meta