@main def main(): Unit = val s = "hello" // indexOf returns the position, or -1 if absent println(s.indexOf('l')) println(s.indexOf("xyz"))
position of a char or substring