lowercase

expect fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.5

Samples

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

fun main() { 
   //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
}

expect fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}
actual inline fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.5

Samples

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

fun main() { 
   //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
}

actual inline fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase(Locale.US) returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   val chars = listOf('A', 'Ω', '1', 'a', '+', 'İ')
val lowercase = chars.map { it.lowercase() }
val turkishLocale = Locale.forLanguageTag("tr")
val lowercaseTurkish = chars.map { it.lowercase(turkishLocale) }
println(lowercase) // [a, ω, 1, a, +, \u0069\u0307]
println(lowercaseTurkish) // [a, ω, 1, a, +, i] 
   //sampleEnd
}

inline fun String.lowercase(locale: Locale): String(source)

Returns a copy of this string converted to lower case using the rules of the specified locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   println("KOTLIN".lowercase()) // kotlin
val turkishLocale = Locale.forLanguageTag("tr")
println("KOTLIN".lowercase(turkishLocale)) // kotlın 
   //sampleEnd
}

actual inline fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.5

Samples

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

fun main() { 
   //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
}

actual inline fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}
actual fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.5

Samples

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

fun main() { 
   //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
}

actual fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.5

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}
actual fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.8

Samples

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

fun main() { 
   //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
}

actual fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.8

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}
actual fun Char.lowercase(): String(source)

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

This function supports one-to-many character mapping, thus the length of the returned string can be greater than one. For example, '\u0130'.lowercase() returns "\u0069\u0307", where '\u0130' is the LATIN CAPITAL LETTER I WITH DOT ABOVE character (İ). If this character has no lower case mapping, the result of toString() of this char is returned.

Since Kotlin

1.8

Samples

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

fun main() { 
   //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
}

actual fun String.lowercase(): String(source)

Returns a copy of this string converted to lower case using Unicode mapping rules of the invariant locale.

This function supports one-to-many and many-to-one character mapping, thus the length of the returned string can be different from the length of the original string.

Since Kotlin

1.8

Samples

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

fun main() { 
   //sampleStart 
   println("Iced frappé!".lowercase()) // iced frappé! 
   //sampleEnd
}