title: Strip indent in Groovy multiline strings
body: <p>Unfortunately <code>stripIndent</code> on a multiline string does not work.
  Side note: My IDE code style preferences allow only space indentation (tabs will be replaced by spaces). But I think this should have no matter.</p>
  <pre><code>def s = &quot;&quot;&quot; This 
              is
              multiline
  &quot;&quot;&quot;
  println s.stripIndent()
  </code></pre>
  <p>does not print</p>
  <pre><code>This
  is
  multiline
  </code></pre>
  <p>as expected.</p>
  <p>The output is with indentation.</p>
  <pre><code>This 
                 is
                 multiline
  </code></pre>
  <p>What is going wrong here?</p>
  <p>I use Groovy 2.0.7 with Eclipse Indigo SR2.</p>
  <p>The problem seems to disappear with the use of the <em>backslash</em> <code>\</code> (String continuation character) in first line. But I don't understand why this is a must.</p>