applyIfNotNull

inline fun <T : Any, V : Any> T.applyIfNotNull(value: V?, block: T.(V) -> Unit): T

Applies given block if the value is not null, supplies non-nullable value to the block as an input.

Sources

Katlib source
Link copied to clipboard