W3cubDocs

/Kotlin

subList

Platform and version requirements: JVM (1.0), JS (1.1), Native (1.3)
abstract fun subList(fromIndex: Int, toIndex: Int): List<E>

Returns a view of the portion of this list between the specified fromIndex (inclusive) and toIndex (exclusive). The returned list is backed by this list, so non-structural changes in the returned list are reflected in this list, and vice-versa.

Structural changes in the base list make the behavior of the view undefined.

© 2010–2019 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/sub-list.html