Substitute values in a string with placeholders in Scala

后端 未结 5 375
日久生厌
日久生厌 2020-12-24 03:33

I have just started using Scala and wish to better understand the functional approach to problem solving. I have pairs of strings the first has placeholders for parameter an

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-24 04:01

    Scala 2.10 introduces syntax for making string interpolation simpler.

    for (i <- 0 to 10)
        println(s"iteration: $i")
    

提交回复
热议问题