copy_string(aReadable.BeginReading(), aReadable.EndReading(), buffer);
nsReadingIterator<CharT> fromBegin, fromEnd; CharT* toBegin = buffer; copy_string(aReadable.BeginReading(fromBegin), aReadable.EndReading(fromEnd), toBegin);
basic_nsAWritableString<CharT>::ReplaceFromPromise( PRUint32 cutStart, PRUint32 cutLength, const basic_nsAReadableString<CharT>& aReadable )  {    if ( !aReadable.Promises(*this) )      do_ReplaceFromReadable(cutStart, cutLength, aReadable);    else      {        PRUint32 length = aReadable.Length();        CharT* buffer = new CharT[length];        if ( buffer )          {            copy_string(aReadable.BeginReading(), aReadable.EndReading(), buffer);            do_ReplaceFromReadable(cutStart, cutLength, basic_nsLiteralString<CharT>(buffer, length));            delete buffer;          }        // else assert?      }  }