Bug 212272: Switch some Substring users over to String(Begins|Ends)With. r=dwitte, sr=bzbarsky

git-svn-id: svn://10.0.0.236/trunk@144817 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jaggernaut%netscape.com
2003-07-14 07:37:39 +00:00
parent be1d65007b
commit 36ab3d76a9
49 changed files with 140 additions and 229 deletions

View File

@@ -970,10 +970,10 @@ nsresult nsHTMLTokenizer::ConsumeSpecialMarkup(PRUnichar aChar,CToken*& aToken,n
if(theIndex==kNotFound) {
if('['==theBufCopy.CharAt(0)) {
aToken = theAllocator->CreateTokenOfType(eToken_cdatasection,eHTMLTag_comment);
} else if (Substring(theBufCopy, 0, 7).Equals(NS_LITERAL_STRING("ELEMENT")) ||
Substring(theBufCopy, 0, 7).Equals(NS_LITERAL_STRING("ATTLIST")) ||
Substring(theBufCopy, 0, 6).Equals(NS_LITERAL_STRING("ENTITY")) ||
Substring(theBufCopy, 0, 8).Equals(NS_LITERAL_STRING("NOTATION"))) {
} else if (StringBeginsWith(theBufCopy, NS_LITERAL_STRING("ELEMENT")) ||
StringBeginsWith(theBufCopy, NS_LITERAL_STRING("ATTLIST")) ||
StringBeginsWith(theBufCopy, NS_LITERAL_STRING("ENTITY")) ||
StringBeginsWith(theBufCopy, NS_LITERAL_STRING("NOTATION"))) {
aToken = theAllocator->CreateTokenOfType(eToken_markupDecl,eHTMLTag_markupDecl);
} else {
aToken = theAllocator->CreateTokenOfType(eToken_comment,eHTMLTag_comment);