firstOrNull (original) (raw)

Returns the first element, or null if the array is empty.

Since Kotlin

1.0


Returns the first element matching the given predicate, or null if element was not found.

Since Kotlin

1.0


Returns the first element, or null if the collection is empty.

Since Kotlin

1.0


Returns the first element, or null if the list is empty.

Since Kotlin

1.0


Returns the first element, or null if the array is empty.

Since Kotlin

1.3


Returns the first element matching the given predicate, or null if element was not found.

Since Kotlin

1.3