uppercase Char
Converts this character to upper 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 uppercase function. If this character has no mapping equivalent, the character itself is returned.
Since Kotlin
Samples
import samples.*
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'ω', '1', 'ʼn', 'A', '+', 'ß')
val uppercaseChar = chars.map { it.uppercaseChar() }
val uppercase = chars.map { it.uppercase() }
assertPrints(uppercaseChar, "[A, Ω, 1, ʼn, A, +, ß]")
assertPrints(uppercase, "[A, Ω, 1, ʼN, A, +, SS]")
//sampleEnd
}
Converts this character to upper 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 uppercase function. If this character has no mapping equivalent, the character itself is returned.
Since Kotlin
Samples
import samples.*
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'ω', '1', 'ʼn', 'A', '+', 'ß')
val uppercaseChar = chars.map { it.uppercaseChar() }
val uppercase = chars.map { it.uppercase() }
assertPrints(uppercaseChar, "[A, Ω, 1, ʼn, A, +, ß]")
assertPrints(uppercase, "[A, Ω, 1, ʼN, A, +, SS]")
//sampleEnd
}
Converts this character to upper 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 uppercase function. If this character has no mapping equivalent, the character itself is returned.
Since Kotlin
Samples
import samples.*
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'ω', '1', 'ʼn', 'A', '+', 'ß')
val uppercaseChar = chars.map { it.uppercaseChar() }
val uppercase = chars.map { it.uppercase() }
assertPrints(uppercaseChar, "[A, Ω, 1, ʼn, A, +, ß]")
assertPrints(uppercase, "[A, Ω, 1, ʼN, A, +, SS]")
//sampleEnd
}
Converts this character to upper 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 uppercase function. If this character has no mapping equivalent, the character itself is returned.
Since Kotlin
Samples
import samples.*
import java.util.*
import kotlin.test.*
fun main() {
//sampleStart
val chars = listOf('a', 'ω', '1', 'ʼn', 'A', '+', 'ß')
val uppercaseChar = chars.map { it.uppercaseChar() }
val uppercase = chars.map { it.uppercase() }
assertPrints(uppercaseChar, "[A, Ω, 1, ʼn, A, +, ß]")
assertPrints(uppercase, "[A, Ω, 1, ʼN, A, +, SS]")
//sampleEnd
}