title: String interpolation in Scala 2.10 - How to interpolate a String variable?
body: <p>String interpolation is <a href="http://docs.scala-lang.org/overviews/core/string-interpolation.html" rel="noreferrer">available in Scala</a> starting Scala 2.10 </p>
  
  <p>This is the basic example </p>
  
  <pre><code> val name = "World"            //&gt; name  : String = World
   val message = s"Hello $name"  //&gt; message  : String = Hello World
  </code></pre>
  
  <p>I was wondering if there is a way to do dynamic interpolation, e.g. the following (doesn't compile, just for illustration purposes)</p>
  
  <pre><code> val name = "World"            //&gt; name  : String = World
   val template = "Hello $name"  //&gt; template  : String = Hello $name
   //just for illustration:
   val message = s(template)     //&gt; doesn't compile (not found: value s)
  </code></pre>
  
  <ol>
  <li><p>Is there a way to "dynamically" evaluate a String like that? (or is it inherently wrong / not possible)</p></li>
  <li><p>And what is <code>s</code> exactly? <del>it's not a method def</del> (<a href="http://www.scala-lang.org/files/archive/nightly/docs/library/index.html#scala.StringContext@s(args:Any*):String" rel="noreferrer">apparently it is a method on <code>StringContext</code></a>), and not an object (if it was, it would have thrown a different compile error than <em>not found</em> I think)</p></li>
  </ol>
  
  <hr>