core-ktx / androidx.util / android.util.SparseArray / remove

remove

fun <T> SparseArray<T>.remove(key: Int, value: T): Boolean

Removes the entry for key only if it is mapped to value.