if(aIgnoreCase) { PRUnichar theChar=nsCRT::ToUpper(aChar); while(++ptr<last){ if(nsCRT::ToUpper(*ptr)==theChar) return ptr-root; } } else { while(++ptr<last){ if(*ptr==aChar) return (ptr-root);
if(anOffset<0) anOffset=0;  if(aCount<0) aCount = (PRInt32)aDestLength;  if((0<aDestLength) && ((PRUint32)anOffset<aDestLength)) {  if(0<aCount) {  const PRUnichar* root = (PRUnichar*)aDest; const PRUnichar* left = root+anOffset; const PRUnichar* last = left+aCount; const PRUnichar* max  = root+aDestLength; const PRUnichar* end  = (last<max) ? last : max;  if(aIgnoreCase) { PRUnichar theChar=nsCRT::ToUpper(aChar); while(left<end){ if(nsCRT::ToUpper(*left)==theChar) return left-root; ++left; } } else { while(left<end){ if(*left==aChar) return (left-root); ++left; } }
inline PRInt32 FindChar2(const char* aDest,PRUint32 aLength,PRUint32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase) {  const PRUnichar*  root=(PRUnichar*)aDest;  const PRUnichar*  ptr=root+(anOffset-1);  const PRUnichar*  last=root+aLength;  if(aIgnoreCase) {    PRUnichar theChar=nsCRT::ToUpper(aChar);    while(++ptr<last){      if(nsCRT::ToUpper(*ptr)==theChar)        return ptr-root;    }  }  else {    while(++ptr<last){      if(*ptr==aChar)        return (ptr-root);    }  }  return kNotFound;}