Strings In Depth8 / 19
Up next

Interpolators

@main def main(): Unit =
  val name = "Ada"
  val pi = 3.14159
  // s splices, f applies printf-style formatting
  println(s"hi $name")
  println(f"$pi%.2f")
  // raw leaves escape sequences untouched
  println(raw"line\n")
What you're solving

s, f, and raw