On 09/18/10 20:48, Caolán McNamara wrote:
On Sat, 2010-09-18 at 19:31 +0200, Bartosz wrote:
At TODO list there is topic about String and UniString removal:
http://wiki.services.openoffice.org/wiki/To-Dos#General_Refactoring_Improvements
I found some declaration of the String, ByteString, UniString at:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m87/tools/inc/tools/string.hxx
Also OString declaration at file:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m87/sal/inc/rtl/string.hxx
and OUString at:
http://svn.services.openoffice.org/opengrok/xref/DEV300_m87/sal/inc/rtl/ustring.hxx
What is the main differents between them and which one is obsolete?
There are basically four string classes
rtl::OString the favoured class where each unit is 8bit
...and of arbitrary encoding (ISO 8859-1, or UTF-8, or ...)
rtl::OUString the favoured class where each unit is 16bit
... and of fixed UTF-16 encoding
ByteString, deprecated 8bit strings
UniString (alias "String") deprecated 16bit strings
Generally should replace ByteString with rtl::OString and UniString with
rtl::OUString. But also see rtl::OUStringBuffer and rtl::OStringBuffer
when replacing UniString/ByteString as they're often necessary.
And if any constructs cannot be converted easily, it should be discussed
(at interface-disc...@ooo) whether to enhance the rtl classes.
-Stephan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]