code: protected boolean canConsumeThisString(String string, boolean consume) {
          if (string == null) {
              return false;
          }
          for (int i = 0; i < string.length(); i++) {
              if (!input.next(i).is(string.charAt(i))) {
                  return false;
              }
          }
          if (consume) {
              input.consume(string.length());
          }
          return true;
      }
docs: Checks if the next characters, starting from the current, match the given string.
  
  @param string  the string to check
  @param consume determines if the matched string should be consumed immediately
  @return <tt>true</tt> if the next characters of the input match the given string, <tt>false</tt>
  otherwise