scala interpolator 字符串插值

霍华德

关注

阅读 30

2023-05-07


http://docs.scala-lang.org/zh-cn/overviews/core/string-interpolation.html

The simple string interpolator. It inserts its arguments between corresponding parts of the string context. It also treats standard escape sequences as defined in the Scala specification. Here’s an example of usage:

val name = \"James\" println(s\"Hello, $name\") // Hello, James


精彩评论(0)

0 0 举报