nsString::StripChar(PRUnichar aChar,PRInt32 anOffset){ if(mLength && (anOffset<PRInt32(mLength))) { if(eOneByte==mCharSize) { char*  to   = mStr + anOffset; char*  from = mStr + anOffset; char*  end  = mStr + mLength;  while (from < end) { char theChar = *from++; if(aChar!=theChar) { *to++ = theChar; } } *to = 0; mLength=to - mStr; } else { PRUnichar*  to   = mUStr + anOffset; PRUnichar*  from = mUStr + anOffset; PRUnichar*  end  = mUStr + mLength;  while (from < end) { PRUnichar theChar = *from++; if(aChar!=theChar) { *to++ = theChar; } } *to = 0; mLength=to - mUStr; } } }
void StripChar( char aChar, PRInt32 anOffset=0 )       { StripChar((PRUnichar) (unsigned char)aChar,anOffset); }
nsString::StripChar(PRUnichar aChar,PRInt32 anOffset){  if(mLength && (anOffset<PRInt32(mLength))) {    if(eOneByte==mCharSize) {      char*  to   = mStr + anOffset;      char*  from = mStr + anOffset;      char*  end  = mStr + mLength;      while (from < end) {        char theChar = *from++;        if(aChar!=theChar) {          *to++ = theChar;        }      }      *to = 0; //add the null      mLength=to - mStr;    }    else {      PRUnichar*  to   = mUStr + anOffset;      PRUnichar*  from = mUStr + anOffset;      PRUnichar*  end  = mUStr + mLength;      while (from < end) {        PRUnichar theChar = *from++;        if(aChar!=theChar) {          *to++ = theChar;        }      }      *to = 0; //add the null      mLength=to - mUStr;    }  }}