isUpperCase

Common
JVM
JS
Native
1.0

Returns true if this character is upper case.

A character is considered to be an upper case character if its category is CharCategory.UPPERCASE_LETTER, or it has contributory property Other_Uppercase as defined by the Unicode Standard.

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

fun main(args: Array<String>) {
//sampleStart
val chars = listOf('A', 'Ψ', 'a', '1', '+')
val (upperCases, notUpperCases) = chars.partition { it.isUpperCase() }
println(upperCases) // [A, Ψ]
println(notUpperCases) // [a, 1, +]
//sampleEnd
}