@main def main(): Unit = val s = "hello world" // substring(start, end) is end-exclusive println(s.substring(0, 5)) // slice reads like it does on any sequence println(s.slice(6, 11))
extract a sub-range of text