Strings In Depth14 / 17
Up next

substring

fun main() {
    val s = "hello world"
    // substring(start, end) excludes end
    println(s.substring(0, 5))
    println(s.substring(6))
}
What you're solving

end-exclusive substring by index