isLowerCase
Returns true if the Unicode character corresponding to this code point is lower case.
A character is considered to be a lower case character if its category is CharCategory.LOWERCASE_LETTER, or it has contributory property Other_Lowercase as defined by the Unicode Standard.
Since Kotlin
2.5Samples
import kotlin.text.unicode.*
import kotlin.test.*
fun main() {
//sampleStart
val codePoints = "1Aa+ππ¨".asCodePointSequence()
val [lowerCases, notLowerCases] = codePoints.partition { it.isLowerCase() }
println(lowerCases) // [a, π¨]
println(notLowerCases) // [1, A, +, π]
//sampleEnd
}Content copied to clipboard
Returns true if the Unicode character corresponding to this code point is lower case.
A character is considered to be a lower case character if its category is CharCategory.LOWERCASE_LETTER, or it has contributory property Other_Lowercase as defined by the Unicode Standard.
Since Kotlin
2.5Samples
import kotlin.text.unicode.*
import kotlin.test.*
fun main() {
//sampleStart
val codePoints = "1Aa+ππ¨".asCodePointSequence()
val [lowerCases, notLowerCases] = codePoints.partition { it.isLowerCase() }
println(lowerCases) // [a, π¨]
println(notLowerCases) // [1, A, +, π]
//sampleEnd
}Content copied to clipboard