isJavaIdentifierPart

Returns true if this character (Unicode code point) may be part of a Java identifier as other than the first character.

Since Kotlin

1.0

Samples

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

fun main() { 
   //sampleStart 
   val chars = listOf('a', '_', '1', 'β', '$', '+', ';')
val (javaIdentifierParts, notJavaIdentifierParts) = chars.partition { it.isJavaIdentifierPart() }
println(javaIdentifierParts) // [a, _, 1, β, $]
println(notJavaIdentifierParts) // [+, ;] 
   //sampleEnd
}