Strings In Depth10 / 19
Up next

replace

@main def main(): Unit =
  val s = "one two two"
  // replace swaps every literal match
  println(s.replace("two", "2"))
What you're solving

swap every occurrence