isLetterOrDigit
Returns true
if this character is a letter or digit.
Since Kotlin
1.0See also
Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', '1', '+')
val (letterOrDigitList, notLetterOrDigitList) = chars.partition { it.isLetterOrDigit() }
println(letterOrDigitList) // [a, 1]
println(notLetterOrDigitList) // [+]
//sampleEnd
}