Strings In Depth8 / 17
Up next

Iterate lines

fun main() {
    val text = "one\ntwo\nthree"
    val lines = text.lines()
    println(lines.size)
    lines.forEach { println(it) }
}
What you're solving

split a multi-line string