std:std.collections.Stack<T>.Slice
Returns a range of elements from the stack.
Returns a slice of the stack consisting of all elements from index1
until index2
or the end of the stack.
If either index is negative, then it represents an offset from the end of the stack.
Indices are clamped to the length of the stack, so Slice will never cause a runtime error.
Parameters | |
---|---|
index1 |
index1 the index of the first element (inclusive). |
index2 |
index2 the index of the last element (exclusive). |