inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase,PRInt32 aCount) {
inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRInt32 aCount) {
inline PRInt32 FindChar1(const char* aDest,PRUint32 aDestLength,PRInt32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase,PRInt32 aCount) {  if(anOffset < 0)    anOffset=0;  if(aCount < 0)    aCount = (PRInt32)aDestLength;  if((aChar < 256) && (0 < aDestLength) && ((PRUint32)anOffset < aDestLength)) {    //We'll only search if the given aChar is within the normal ascii a range,    //(Since this string is definitely within the ascii range).        if(0<aCount) {      const char* left= aDest+anOffset;      const char* last= left+aCount;      const char* max = aDest+aDestLength;      const char* end = (last<max) ? last : max;      if(aIgnoreCase) {        // safe because aChar < 256        char theChar=toupper(char(aChar));                while(left<end){                    if(toupper(*left)==theChar)            return left-aDest;                    ++left;        }      }      else {        PRInt32 theMax = end-left;        if(0<theMax) {                    unsigned char theChar = (unsigned char) aChar;          const char* result=(const char*)memchr(left, (int)theChar, theMax);                    if(result)            return result-aDest;                  }      }    }  }  return kNotFound;}