uppercase

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}

Converts this code point to upper case using Unicode mapping rules of the invariant locale.

This function supports one-to-many character mapping, thus the returned string can contain more than one code point. For example, CodePoint(0xFB00).uppercase() returns "\u0046\u0046", where '\uFB00' is the LATIN SMALL LIGATURE FF character (ff). If this code point has no upper case mapping, the result of toString() of this code point is returned.

Since Kotlin

2.5

Samples

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

fun main() { 
   //sampleStart 
   val codePoints = "aω1ʼnA+ß𐐨".asCodePointSequence()
val uppercaseCodePoints = codePoints.map { it.uppercaseCodePoint() }.toList()
val uppercase = codePoints.map { it.uppercase() }.toList()
println(uppercaseCodePoints) // [A, Ω, 1, ʼn, A, +, ß, 𐐀]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS, 𐐀] 
   //sampleEnd
}