RosettaCodeData/Task/String-case/Kotlin/string-case.kts

10 lines
211 B
Text
Raw Permalink Normal View History

2026-02-01 16:33:20 -08:00
// version 2.3.0
2023-07-01 11:58:00 -04:00
2026-02-01 16:33:20 -08:00
fun main() {
2023-07-01 11:58:00 -04:00
val s = "alphaBETA"
2026-02-01 16:33:20 -08:00
println(s.uppercase())
println(s.lowercase())
println(s.replaceFirstChar{ it.uppercase() })
println(s.replaceFirstChar{ it.lowercase() })
2023-07-01 11:58:00 -04:00
}