Array.insertBack - multiple declarations
Function Array.insertBack
Append single element c to the end.
void insertBack
(
T c
);
Example
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);
Function Array.insertBack
Append all elements of slice s to the end.
void insertBack
(
const(T)[] s
);
Example
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]);