dropLast

fun <T> Array<out T>.dropLast(n: Int): List<T>(source)
fun <T> List<T>.dropLast(n: Int): List<T>(source)

Returns a list containing all elements except last n elements.

Since Kotlin

1.0

Throws

Samples


Returns a list containing all elements except last n elements.

Since Kotlin

1.3

Throws

Samples