Array.insertBack

Append all elements of slice s to the end.

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

Examples

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

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

Meta