isJavaIdentifierStart

Returns true if this character is permissible as the first character in a Java identifier.

Since Kotlin

1.0

Samples

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

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