for bug 100214 - make nsStr routines stop depending on nsCRT:: routines, to further reduce our dependency on unicharutil

r=jag, sr=scc


git-svn-id: svn://10.0.0.236/trunk@105795 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
alecf%netscape.com
2001-10-19 20:49:39 +00:00
parent 8850710011
commit 44ffdedad3
4 changed files with 254 additions and 134 deletions

View File

@@ -1325,6 +1325,7 @@ PRBool nsString::EqualsWithConversion(const PRUnichar* aString,PRBool aIgnoreCas
return result;
}
PRInt32 Compare2To2(const char* aStr1,const char* aStr2,PRUint32 aCount,PRBool aIgnoreCase);
/**
* Compare this to given atom; note that we compare full strings here.
* The optional length argument just lets us know how long the given string is.
@@ -1344,10 +1345,7 @@ PRBool nsString::EqualsAtom(/*FIX: const */nsIAtom* aAtom,PRBool aIgnoreCase) co
const PRUnichar* unicode;
if (aAtom->GetUnicode(&unicode) != NS_OK || unicode == nsnull)
return PR_FALSE;
if (aIgnoreCase)
cmp=nsCRT::strcasecmp(mUStr,unicode);
else
cmp=nsCRT::strcmp(mUStr,unicode);
cmp=Compare2To2((const char*)mUStr,(const char*)unicode, nsCRT::strlen(mUStr), aIgnoreCase);
result=PRBool(0==cmp);
}