nsWritingIterator<PRUnichar> writer; aDest.SetLength(Distance(aSrcStart, aSrcEnd)); aDest.BeginWriting(writer); nsReadingIterator<PRUnichar> fromBegin(aSrcStart);  copy_string(fromBegin, aSrcEnd, writer);
nsReadingIterator<PRUnichar> fromBegin, fromEnd; PRUnichar* toBegin = aDest; copy_string(aSource.BeginReading(fromBegin).advance( PRInt32(aSrcOffset) ), aSource.BeginReading(fromEnd).advance( PRInt32(aSrcOffset+aLength) ), toBegin); return aDest;
CopyUnicodeTo( const nsReadingIterator<PRUnichar>& aSrcStart,               const nsReadingIterator<PRUnichar>& aSrcEnd,               nsAWritableString& aDest )  {    nsWritingIterator<PRUnichar> writer;    aDest.SetLength(Distance(aSrcStart, aSrcEnd));    aDest.BeginWriting(writer);    nsReadingIterator<PRUnichar> fromBegin(aSrcStart);        copy_string(fromBegin, aSrcEnd, writer);  }