code: public void setString(String string) {
  
          this.string = string;
          if (string != null) {
              this.length = string.length();
              chars = this.string.toCharArray();
          } else {
              this.length = 0;
              chars = new char[0];
          }
          reset();
  
      }
docs: Set the String we are currently parsing.  The parser state is also reset
  to begin at the start of this string.
  
  @param string The string to be parsed.