code: public String lookahead() {
          if (buf != null) {
              return new String(buf, bufPos, buf.length - bufPos);
          } else {
              return text.substring(pos.getIndex());
          }
      }
docs: Returns a string containing the remainder of the characters to be
  returned by this iterator, without any option processing.  If the
  iterator is currently within a variable expansion, this will only
  extend to the end of the variable expansion.  This method is provided
  so that iterators may interoperate with string-based APIs.  The typical
  sequence of calls is to call skipIgnored(), then call lookahead(), then
  parse the string returned by lookahead(), then call jumpahead() to
  resynchronize the iterator.
  @return a string containing the characters to be returned by future
  calls to next()