first Or Null
Returns the first element, or null
if the array is empty.
inline fun DoubleArray.firstOrNull(predicate: (Double) -> Boolean): Double?
Content copied to clipboard
inline fun BooleanArray.firstOrNull(predicate: (Boolean) -> Boolean): Boolean?
Content copied to clipboard
Returns the first element matching the given predicate, or null
if element was not found.
Returns the first element, or null
if the collection is empty.
Returns the first element, or null
if the list is empty.
Returns the first element, or null
if the array is empty.
Since Kotlin
1.3
inline fun UShortArray.firstOrNull(predicate: (UShort) -> Boolean): UShort?
Content copied to clipboard
Returns the first element matching the given predicate, or null
if element was not found.
Since Kotlin
1.3