W3cubDocs

/Kotlin

isUpperCase

Platform and version requirements: JVM (1.0), Native (1.3)
fun Char.isUpperCase(): Boolean
For JVM

Returns true if this character is upper case.

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

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
}
For Native

Returns true if this character is upper case.

© 2010–2020 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.text/is-upper-case.html