titlecaseChar
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.5Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.5Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.5Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.5Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.8Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}
Converts this character to title 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 titlecase function. If this character has no mapping equivalent, the result of calling uppercaseChar is returned.
Since Kotlin
1.8Samples
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'Η
', 'Ε', '+', 'Γ')
val titlecaseChar = chars.map { it.titlecaseChar() }
val titlecase = chars.map { it.titlecase() }
println(titlecaseChar) // [A, Η
, Ε, +, Γ]
println(titlecase) // [A, Η
, ΚΌN, +, Ss]
//sampleEnd
}