const char* ptr = aDest+anOffset; char theChar=(char)aChar; const char* result=(const char*)memchr(ptr, theChar,aLength-anOffset); if(result) { return result-aDest;
PRInt32 theMax = aDestLength-anOffset; char theChar=(char)aChar; const char* result=(const char*)memchr(left, theChar, theMax); if(result) { return result-aDest; }
inline PRInt32 FindChar1(const char* aDest,PRUint32 aLength,PRUint32 anOffset,const PRUnichar aChar,PRBool aIgnoreCase) {  if(aChar<256) {    if(aIgnoreCase) {      char theChar=(char)nsCRT::ToUpper(aChar);      const char* ptr=aDest+(anOffset-1);      const char* last=aDest+aLength;      while(++ptr<last){        if(nsCRT::ToUpper(*ptr)==theChar)          return ptr-aDest;      }    }    else {      const char* ptr = aDest+anOffset;      char theChar=(char)aChar;      const char* result=(const char*)memchr(ptr, theChar,aLength-anOffset);      if(result) {        return result-aDest;      }    }  }  return kNotFound;}