isJavaIdentifierPart

inline fun Char.isJavaIdentifierPart(): Boolean

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

Samples

import samples.*
import java.util.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = listOf('a', '_', '1', 'β', '$', '+', ';')
val (javaIdentifierParts, notJavaIdentifierParts) = chars.partition { it.isJavaIdentifierPart() }
assertPrints(javaIdentifierParts, "[a, _, 1, β, $]")
assertPrints(notJavaIdentifierParts, "[+, ;]") 
   //sampleEnd
}