Strings In Depth11 / 19
Up next

Trim whitespace

@main def main(): Unit =
  val padded = "  spaced  "
  // strip removes surrounding whitespace
  println(padded.strip + "!")
What you're solving

strip leading and trailing spaces