lowercaseChar

Platform and version requirements: JVM (1.5), JS (1.5), Native (1.5)
fun Char.lowercaseChar(): Char

Converts this character to lower case using Unicode mapping rules of the invariant locale.

This function performs one-to-one character mapping. To support one-to-many character mapping use the lowercase function. If this character has no mapping equivalent, the character itself is returned.

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

fun main(args: Array<String>) {
//sampleStart
val chars = listOf('A', 'Ω', '1', 'a', '+', 'İ')
val lowercaseChar = chars.map { it.lowercaseChar() }
val lowercase = chars.map { it.lowercase() }
println(lowercaseChar) // [a, ω, 1, a, +, i]
println(lowercase) // [a, ω, 1, a, +, \u0069\u0307]
//sampleEnd
}

© 2010–2021 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/lowercase-char.html