W3cubDocs

/Kotlin

takeUnless

Platform and version requirements: JVM (1.1), JS (1.1), Native (1.1)
inline fun <T> T.takeUnless(predicate: (T) -> Boolean): T?

Returns this value if it does not satisfy the given predicate or null, if it does.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/take-unless.html