code: public static CharSequence takeWhile(CharSequence self, @ClosureParams(value=SimpleType.class, options="char") Closure condition) {
          int num = 0;
          BooleanClosureWrapper bcw = new BooleanClosureWrapper(condition);
          while (num < self.length()) {
              char value = self.charAt(num);
              if (bcw.call(value)) {
                  num += 1;
              } else {
                  break;
              }
          }
          return take(self, num);
      }
docs: Returns the longest prefix of this CharSequence where each
  element passed to the given closure evaluates to true.
  <p>
  <pre class="groovyTestCase">
  def text = "Groovy"
  assert text.takeWhile{ it < 'A' } == ''
  assert text.takeWhile{ it < 'Z' } == 'G'
  assert text.takeWhile{ it != 'v' } == 'Groo'
  assert text.takeWhile{ it < 'z' } == 'Groovy'
  </pre>
  
  @param self      the original CharSequence
  @param condition the closure that must evaluate to true to continue taking elements
  @return a prefix of elements in the CharSequence where each
  element passed to the given closure evaluates to true
  @since 2.0.0