uppercaseChar

Common
JVM
JS
Native
1.5

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.

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

fun main(args: Array<String>) {
//sampleStart
val chars = listOf('a', 'ω', '1', 'ʼn', 'A', '+', 'ß')
val uppercaseChar = chars.map { it.uppercaseChar() }
val uppercase = chars.map { it.uppercase() }
println(uppercaseChar) // [A, Ω, 1, ʼn, A, +, ß]
println(uppercase) // [A, Ω, 1, ʼN, A, +, SS]
//sampleEnd
}