fix of Patch for Bug 75081: nsCString::FindChar is stupid. Extremely stupid

Patch by bratell@lysator.liu.se
Fix by Henry.Jia@sun.com
r=jag, sr=alecf
This commit is contained in:
henry.jia%sun.com 2002-08-14 05:06:09 +00:00
Родитель 2ed04a52f2
Коммит 0f450debc8
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -468,7 +468,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
if(aEliminateLeading) {
while(++theIndex<=theMax) {
PRUnichar theChar=GetCharAt(aDest, theIndex);
PRUnichar theChar=::GetCharAt(aDest, theIndex);
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
if(kNotFound==thePos)
break;
@ -489,7 +489,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
theIndex=aDest.mLength;
PRInt32 theNewLen=theIndex;
while(--theIndex>=0) {
PRUnichar theChar=GetCharAt(aDest, theIndex); //read at end now...
PRUnichar theChar=::GetCharAt(aDest, theIndex); //read at end now...
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
if(kNotFound<thePos)
theNewLen=theIndex;

Просмотреть файл

@ -468,7 +468,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
if(aEliminateLeading) {
while(++theIndex<=theMax) {
PRUnichar theChar=GetCharAt(aDest, theIndex);
PRUnichar theChar=::GetCharAt(aDest, theIndex);
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
if(kNotFound==thePos)
break;
@ -489,7 +489,7 @@ void nsStrPrivate::Trim(nsStr& aDest,const char* aSet,PRBool aEliminateLeading,P
theIndex=aDest.mLength;
PRInt32 theNewLen=theIndex;
while(--theIndex>=0) {
PRUnichar theChar=GetCharAt(aDest, theIndex); //read at end now...
PRUnichar theChar=::GetCharAt(aDest, theIndex); //read at end now...
PRInt32 thePos=::FindChar1(aSet,theSetLen,0,theChar,PR_FALSE,theSetLen);
if(kNotFound<thePos)
theNewLen=theIndex;