a -> A 로 변환
fun Char.uppercase(): String
fun String.uppercase(): String
fun Char.uppercase(locale: Locale): String
fun String.uppercase(locale: Locale): String
println("Kotlin".uppercase()) // KOTLIN
val turkishLocale = Locale.forLanguageTag("tr")
println("Kotlin".uppercase(turkishLocale)) // KOTLİN
출력 결과 : KOTLIN KOTLİN
'코틀린' 카테고리의 다른 글
[코틀린 Kotlin] 조건식, 변수 값 비교에 따른 when 표현식 (0) | 2024.09.07 |
---|---|
[코틀린 Kotlin] Multiline Strings(여러 줄의 문자열)/trimIndent(들여쓰기 제거)/trimMargin(여백 제거) (0) | 2024.09.06 |
[코틀린 Kotlin] isLetter - 문자가 알파벳인지 여부 확인 (0) | 2024.09.06 |
[코틀린 Kotlin] removeSuffix - 문자열에서 특정 접미사를 제거한 새로운 문자열 반환 함수 (0) | 2024.09.06 |
[코틀린 Kotlin] indices - 요소의 인덱스 반환 (0) | 2024.09.06 |