String Split in Kotlin
Level 274 keystrokes
Splits a string at a delimiter and prints each part.
Kotlin code
// A string of comma-separated values1val text = "a,b,c"// split(",") cuts the string at each comma and returns List<String> ["a", "b", "c"]2val parts = text.split(",")// Prints each part on its own line3for (p in parts) println(p)Output
a b c
Practice typing this code. Results are not recorded in the rankings.
Symbols in this code
The symbols you type in this Kotlin code and how often they appear.
"× 4,× 3(× 3)× 3=× 2.× 1