关于Scala中的String Interpolation

  Scala provides two other string interpolators by default: raw and f. The raw string interpolator behaves like s, except it does not recognize character literal

escape sequences

  In Scala, string interpolation is implemented by rewriting code at compile time. The compiler will treat any expression consisting of an identifier followed

immediately by the open double quote of a string literal as a string interpolator expression. The s, f, and raw string interpolators are implemented via this general

mechanism.

原文地址:https://www.cnblogs.com/25th-engineer/p/11255919.html