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;
nsWritingIterator<PRUnichar> writer; aDest.SetLength(Distance(aSrcStart, aSrcEnd)); aDest.BeginWriting(writer); nsReadingIterator<PRUnichar> fromBegin(aSrcStart);  copy_string(fromBegin, aSrcEnd, writer);
CopyUnicodeTo( const nsAReadableString& aSource, PRUint32 aSrcOffset, PRUnichar* aDest, PRUint32 aLength )  {    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;  }