Function Array.removeFront

Remove n of elements from the start.

uint removeFront (
  const(uint) n
);

Returns

number of removed elements.

Example

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

arr.insertBack([1,2,3]);
assert(arr.removeFront(3) == 3);

arr.insertBack([1,2,3,4]);
assert(arr.removeFront(2) == 2);
assert(arr.data == [3,4]);

assert(arr.removeFront(3) == 2);
assert(arr.length == 0);