Format and convert
The truth is that programmers often need to embed dynamic variables into static string patterns. To accomplish this feat we used to write something like:
A good news is that Scala 2.10 brings a shiny new string interpolation:
The new syntax is more concise, offers more static checking and provides a better runtime performance.
To facilitate the transition, Scala plugin introduced a new group of intentions to easily convert between all the variants of string formatting:
In addition, we now have a complete format string and argument verification in the following places:
- Interpolated strings