titlecaseCodePoint

Converts this code point 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 code point has no title case equivalent, the result of calling uppercaseCodePoint is returned.

Since Kotlin

2.5

Samples

import kotlin.text.unicode.*
import kotlin.test.*

fun main() { 
   //sampleStart 
   val codePoints = "a+ว…ล‰รŸ๐จ".asCodePointSequence()
val titlecaseCodePoints = codePoints.map { it.titlecaseCodePoint() }.toList()
val titlecase = codePoints.map { it.titlecase() }.toList()
println(titlecaseCodePoints) // [A, +, ว…, ล‰, รŸ, ๐€]
println(titlecase) // [A, +, ว…, สผN, Ss, ๐€] 
   //sampleEnd
}

Converts this code point 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 code point has no title case equivalent, the result of calling uppercaseCodePoint is returned.

Since Kotlin

2.5

Samples

import kotlin.text.unicode.*
import kotlin.test.*

fun main() { 
   //sampleStart 
   val codePoints = "a+ว…ล‰รŸ๐จ".asCodePointSequence()
val titlecaseCodePoints = codePoints.map { it.titlecaseCodePoint() }.toList()
val titlecase = codePoints.map { it.titlecase() }.toList()
println(titlecaseCodePoints) // [A, +, ว…, ล‰, รŸ, ๐€]
println(titlecase) // [A, +, ว…, สผN, Ss, ๐€] 
   //sampleEnd
}