/** * Checks if the substring of the source text starting at the carets position starts with the * give String. Case-Sensitive Comparison is used. * * @param strToMatch * the string to match * @return true if matched */ public boolean startsWithCheckCase(String strToMatch) { int len = strToMatch.length(); if (len > wayToEnd()) { return false; } return CharSequenceUtils.checkEqualCheckCase(src, offset, len, strToMatch, 0, len); }
/** * Checks if the substring of the source text starting at the carets position starts with the * give String. Case-Insensitive Comparison is used. * * @param strToMatch * the string to match * @return true if matched */ public boolean startsWithIgnoreCase(String strToMatch) { int len = strToMatch.length(); if (len > wayToEnd()) { return false; } return CharSequenceUtils.checkEqualIgnoreCase(src, offset, len, strToMatch, 0, len); }
/** * Tries to scan for an opening brace after skipping all preceding whitespace characters. A * correct opening brace is either "<" or "</". * * @return false, if the parsing could not be completed because the end of the HTML source was * reached. True otherwise. */ private boolean scanForOpeningBrace() { caret.walkAfterWhitespaces(); if (caret.wayToEnd() >= 2) { if (caret.startsWithCheckCase("</")) { caret.goN(2); parsedTokenType = Token.END_TAG; status = Status.SCAN_TAG_TYPE; } else if (caret.startsWithCheckCase("<")) { caret.goN(1); parsedTokenType = Token.START_TAG; status = Status.SCAN_TAG_TYPE; } else { status = Status.UNPARSEABLE; } return true; } else { return false; } }
status = Status.COMPLETE; return true; } else if (caret.wayToEnd() >= 2) { if (caret.startsWithCheckCase("/>") || caret.startsWithCheckCase("?>")) { if (parsedTokenType != Token.END_TAG) {