"Split" error when running code for application - TechRepublic
Question
December 6, 2022 at 08:56 AM
HarryStoun

“Split” error when running code for application

by HarryStoun . Updated 3 years ago

I wrote a code in Kotlin and when I run it I get an error Unresolved reference: split. I do not understand something how to fix this, because so far there is little practice with this programming language.

fun main() {
val str = “A:B:C”
val delim = “:”

val list = str.split(delim)

println(list) // [A, B, C]
}

All Comments