josebalius
06/22/2017, 6:56 PMwhen
with strings? Whenever i try using when with a string i get an error:
>>> val test = "Hello"
>>> val test2 = test.replace("lo", "1")
>>> println(test2)
Hel1
>>> when(test2) { 'Hel1' -> println("Hello world") }
error: incompatible types: Char and String
when(test2) { 'Hel1' -> println("Hello world") }
^