fun <T> List<T>.dropLast(n: Int): List<T>
fun <T> Array<out T>.dropLast(n: Int): List<T>
fun ByteArray.dropLast(n: Int): List<Byte>
fun ShortArray.dropLast(n: Int): List<Short>
fun IntArray.dropLast(n: Int): List<Int>
fun LongArray.dropLast(n: Int): List<Long>
fun FloatArray.dropLast(n: Int): List<Float>
fun DoubleArray.dropLast(n: Int): List<Double>
fun BooleanArray.dropLast(n: Int): List<Boolean>
fun CharArray.dropLast(n: Int): List<Char>
Returns a list containing all elements except last n elements.
© 2010–2017 JetBrains s.r.o.
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/drop-last.html