first
fun ByteArray.first(): Byte
fun ShortArray.first(): Short
fun IntArray.first(): Int
fun LongArray.first(): Long
fun FloatArray.first(): Float
fun DoubleArray.first(): Double
fun BooleanArray.first(): Boolean
fun CharArray.first(): Char
@ExperimentalUnsignedTypes fun ULongArray.first(): ULong
@ExperimentalUnsignedTypes fun UByteArray.first(): UByte
@ExperimentalUnsignedTypes fun UShortArray.first(): UShort
inline fun ByteArray.first(
predicate: (Byte) -> Boolean
): Byte
inline fun ShortArray.first(
predicate: (Short) -> Boolean
): Short
inline fun IntArray.first(predicate: (Int) -> Boolean): Int
inline fun LongArray.first(
predicate: (Long) -> Boolean
): Long
inline fun FloatArray.first(
predicate: (Float) -> Boolean
): Float
inline fun DoubleArray.first(
predicate: (Double) -> Boolean
): Double
inline fun BooleanArray.first(
predicate: (Boolean) -> Boolean
): Boolean
inline fun CharArray.first(
predicate: (Char) -> Boolean
): Char
inline fun <T> Iterable<T>.first(
predicate: (T) -> Boolean
): T
@ExperimentalUnsignedTypes inline fun ULongArray.first(
predicate: (ULong) -> Boolean
): ULong
@ExperimentalUnsignedTypes inline fun UByteArray.first(
predicate: (UByte) -> Boolean
): UByte
@ExperimentalUnsignedTypes inline fun UShortArray.first(
predicate: (UShort) -> Boolean
): UShort
Returns the first element matching the given predicate.
Exceptions
fun <T> Iterable<T>.first(): T
fun <T> List<T>.first(): T