cut

fun cut(from: Int, to: Int)

Sublist this list in the range of from to to, discarding any elements outside of that range.

This function is effectively equal to subList, but it effects this list, rather than returning a new one.

Parameters

from

the start index, must be more than 0 and less than to

to

the end index, must be less than size and more than from