isLetterOrDigit

JVM
Native
1.0
fun Char.isLetterOrDigit(): Boolean
For JVM

Returns true if this character is a letter or digit.

import java.util.*
import kotlin.test.*

fun main(args: Array<String>) {
//sampleStart
val chars = listOf('a', '1', '+')
val (letterOrDigitList, notLetterOrDigitList) = chars.partition { it.isLetterOrDigit() }
println(letterOrDigitList) // [a, 1]
println(notLetterOrDigitList) // [+]
//sampleEnd
}
For Native

Returns true if this character is a letter or digit.