subList

fun <T> List<T>.subList(range: Range): List<T>

Return

sublist of this list, starting from range's start (starting from 1) and ending at range's end (both inclusive). If any of the bounds is null, it is replaced by the list's start or end index respectively

Parameters

range

range to get the sublist from