isLowerCase

expect fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

A character is considered to be a lower case letter if its category is CharCategory.LOWERCASE_LETTER.

Since Kotlin

1.5

Samples

import samples.*
import java.util.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = listOf('a', 'λ', 'A', '1', '+')
val (lowerCases, notLowerCases) = chars.partition { it.isLowerCase() }
assertPrints(lowerCases, "[a, λ]")
assertPrints(notLowerCases, "[A, 1, +]") 
   //sampleEnd
}
actual inline fun Char.isLowerCase(): Boolean

Returns true if this character is lower case.

Samples

import samples.*
import java.util.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = listOf('a', 'λ', 'A', '1', '+')
val (lowerCases, notLowerCases) = chars.partition { it.isLowerCase() }
assertPrints(lowerCases, "[a, λ]")
assertPrints(notLowerCases, "[A, 1, +]") 
   //sampleEnd
}

See also

actual fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

A character is considered to be a lower case letter if its category is CharCategory.LOWERCASE_LETTER.

Since Kotlin

1.5

Samples

import samples.*
import java.util.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = listOf('a', 'λ', 'A', '1', '+')
val (lowerCases, notLowerCases) = chars.partition { it.isLowerCase() }
assertPrints(lowerCases, "[a, λ]")
assertPrints(notLowerCases, "[A, 1, +]") 
   //sampleEnd
}
actual fun Char.isLowerCase(): Boolean

Returns true if this character is a lower case letter.

A character is considered to be a lower case letter if its category is CharCategory.LOWERCASE_LETTER.

Samples

import samples.*
import java.util.*
import kotlin.test.*
fun main() { 
   //sampleStart 
   val chars = listOf('a', 'λ', 'A', '1', '+')
val (lowerCases, notLowerCases) = chars.partition { it.isLowerCase() }
assertPrints(lowerCases, "[a, λ]")
assertPrints(notLowerCases, "[A, 1, +]") 
   //sampleEnd
}