title: How do you pass a variable to a custom string interpolator
body: <p>In the worksheet below, I've created a custom string interpolator.</p>
  
  <pre><code>object WSLookup {
  
    implicit class LookupSC(val sc: StringContext) extends AnyVal {
      def lookup(args: Any*): String = {
        val strings = sc.parts.iterator
        val expressions = args.iterator
        var buf = new StringBuffer(strings.next)
  
        while (strings.hasNext) {
          buf append doLookup(expressions.next.toString)
          buf append strings.next
        }
        buf.toString()
      }
  
      def doLookup(s: String): String = {
        // Just change the string to uppercase to test.
        s.toUpperCase
      }
    }
  
    val x = "cool"
    val testString = "Not $x"
    lookup"How $x"
  
    // lookup testString //&lt;--- See question 1
  }
  </code></pre>
  
  <p>I have two questions regarding this:</p>
  
  <ol>
  <li>How do you use the string interpolator on variables</li>
  <li>How do you pass or use an additional argument to your string interpolator. Say for example my string interpolator is used to lookup variables from a file, but I want to specify the file name on the fly?</li>
  </ol>