isUpperCase

actual inline fun Char.isUpperCase(): Boolean(source)

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.

Since Kotlin

1.0

Samples

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

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