copy_string(this->BeginReading()+=cutEnd, this->EndReading(), BeginWriting()+=replacementEnd);
copy_string(this->BeginReading(fromBegin).advance(PRInt32(cutEnd)), this->EndReading(fromEnd), BeginWriting(toBegin).advance(PRInt32(replacementEnd)));
basic_nsAWritableString<CharT>::do_ReplaceFromReadable( PRUint32 cutStart, PRUint32 cutLength, const basic_nsAReadableString<CharT>& aReplacement )  {    PRUint32 oldLength = this->Length();    cutStart = NS_MIN(cutStart, oldLength);    cutLength = NS_MIN(cutLength, oldLength-cutStart);    PRUint32 cutEnd = cutStart + cutLength;    PRUint32 replacementLength = aReplacement.Length();    PRUint32 replacementEnd = cutStart + replacementLength;    PRUint32 newLength = oldLength - cutLength + replacementLength;    if ( cutLength > replacementLength )      copy_string(this->BeginReading()+=cutEnd, this->EndReading(), BeginWriting()+=replacementEnd);    SetLength(newLength);    if ( cutLength < replacementLength )      copy_string_backward(this->BeginReading()+=cutEnd, this->BeginReading()+=oldLength, BeginWriting()+=replacementEnd);    copy_string(aReplacement.BeginReading(), aReplacement.EndReading(), BeginWriting()+=cutStart);  }