code: public static String stripIndent(CharSequence self, int numChars) {
          String s = self.toString();
          if (s.length() == 0 || numChars <= 0) return s;
          try {
              StringBuilder builder = new StringBuilder();
              for (String line : readLines((CharSequence) s)) {
                  // normalize an empty or whitespace line to \n
                  // or strip the indent for lines containing non-space characters
                  if (!isAllWhitespace((CharSequence) line)) {
                      builder.append(stripIndentFromLine(line, numChars));
                  }
                  builder.append("\n");
              }
              // remove the normalized ending line ending if it was not present
              if (!s.endsWith("\n")) {
                  builder.deleteCharAt(builder.length() - 1);
              }
              return builder.toString();
          } catch (IOException e) {
              /* ignore */
          }
          return s;
      }
docs: Strip <tt>numChar</tt> leading characters from
  every line in a CharSequence.
  <pre class="groovyTestCase">
  assert 'DEF\n456' == '''ABCDEF\n123456'''.stripIndent(3)
  </pre>
  
  @param self     The CharSequence to strip the characters from
  @param numChars The number of characters to strip
  @return the stripped String
  @since 1.8.2