toLowerCase
For JVM
Converts this character to lowercase.
import kotlin.test.*
import java.util.*
fun main(args: Array<String>) {
//sampleStart
val chars = listOf('A', 'Ω', '1', 'a', '+')
val lowerCases = chars.map { it.toLowerCase() }
println(lowerCases) // [a, ω, 1, a, +]
//sampleEnd
}
For Native
Converts this character to lowercase.
For Common, JVM, JS
Returns a copy of this string converted to lower case using the rules of the default locale.
import kotlin.test.*
fun main(args: Array<String>) {
//sampleStart
println("Iced frappé!".toLowerCase()) // iced frappé!
//sampleEnd
}
For Native
Returns a copy of this string converted to lower case using the rules of the default locale.
fun String.toLowerCase(locale: Locale): String
Returns a copy of this string converted to lower case using the rules of the specified locale.