string substitution

String interpolation in Scala 2.10 and newer (String variable substitution)

Scala string FAQ: How do I embed variables in strings in Scala?

A lot of nice new features were added in Scala in version 2.10, but a simple feature that makes me happy is string interpolation. This lets Scala developers embed variables inside strings just like you can do in other languages like Perl, PHP, and Ruby -- but perhaps in an even more powerful way. (I say "perhaps" because I haven't used those other languages recently.)

Does Scala have a String variable substitution syntax like Ruby? alvin June 7, 2012 - 7:17am

Scala FAQ: Does Scala have a String variable substitution syntax like Ruby?

UPDATE: If you're using Scala 2.10 or newer, see my new String interpolation in Scala 2.10 (embedding variables in strings) tutorial. If you're using Scala 2.9.x or older, continue with this article.