public String lookahead(){
  if (buf != null) {
    return new String(buf,bufPos,buf.length - bufPos);
  }
 else {
    return text.substring(pos.getIndex());
  }
}

public String lookahead ( ) { if ( buf != null ) { return new String ( buf , bufPos , buf . length - bufPos ) ; } else { return text . substring ( pos . getIndex ( ) ) ; } }
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 .
