if(aIgnoreCase) { PRUnichar theChar=nsCRT::ToUpper(aChar); for(theIndex=(PRInt32)anOffset;theIndex>=0;theIndex--){ if(nsCRT::ToUpper(theBuf[theIndex])==theChar) return theIndex; } } else { for(theIndex=(PRInt32)anOffset;theIndex>=0;theIndex--){ if(theBuf[theIndex]==aChar) return theIndex;
if(aCount<0) aCount = aDestLength;  if((0<aDestLength) && ((PRUint32)anOffset<aDestLength)) {  if(0<aCount) {  const PRUnichar* root      = (PRUnichar*)aDest; const PRUnichar* rightmost = root+anOffset; const PRUnichar* min       = rightmost-aCount+1; const PRUnichar* leftmost  = (min<root) ? root: min;  if(aIgnoreCase) {  PRUnichar theChar=nsCRT::ToUpper(aChar); while(leftmost<rightmost){ if(nsCRT::ToUpper(*rightmost)==theChar) return rightmost-root; --rightmost; } } else {  while(leftmost<=rightmost){ if((*rightmost)==aChar) return rightmost-root; --rightmost; } }
inline PRInt32 RFindChar2(const char* aDest,PRUint32 aDestLength,PRUint32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase) {  PRInt32 theIndex=0;  PRUnichar*  theBuf=(PRUnichar*)aDest;  if(aIgnoreCase) {    PRUnichar theChar=nsCRT::ToUpper(aChar);    for(theIndex=(PRInt32)anOffset;theIndex>=0;theIndex--){      if(nsCRT::ToUpper(theBuf[theIndex])==theChar)        return theIndex;    }  }  else {    for(theIndex=(PRInt32)anOffset;theIndex>=0;theIndex--){      if(theBuf[theIndex]==aChar)        return theIndex;    }  }  return kNotFound;}