number of removed elements.
Array!int arr; scope(exit) arr.free(); arr.insertBack([1,2,3]); assert(arr.removeBack(3) == 3); assert(arr.length == 0); arr.insertBack([1,2,3,4]); assert(arr.removeBack(2) == 2); assert(arr.data == [1,2]); assert(arr.removeBack(3) == 2); assert(arr.length == 0);
Remove n of elements from the end.