popBackN

pragma(inline, true)
size_t
popBackN
(
size_t dim = 0
T
)
(
scope ref inout(T)[] ar
,
size_t n
)
if (
!dim &&
!is(Unqual!T[] == void[])
)

Examples

auto ar = [3, 4];
ar.popBackN(1);
assert(ar == [3]);
ar.popBackN!0(10);  // Slice-like API
assert(ar == []);

Meta