nsAString::const_iterator fromBegin, fromEnd; nsAString::iterator toBegin; aDest.SetLength(aSource.Length()); CopyToUpperCase converter(aDest.BeginWriting(toBegin)); copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);
ConvertToUpperCase converter; converter.write(aString.mUStr, aString.mLength);
ToUpperCase( const nsAString& aSource, nsAString& aDest )  {    nsAString::const_iterator fromBegin, fromEnd;    nsAString::iterator toBegin;    aDest.SetLength(aSource.Length());    CopyToUpperCase converter(aDest.BeginWriting(toBegin));    copy_string(aSource.BeginReading(fromBegin), aSource.EndReading(fromEnd), converter);  }