On 02/28/2012 04:13 PM, Sven Barth wrote:
And instead of introducing yet another type or another special
encoding we could just leverage the features FPC has today and use
TBytes.
I agree, if all features are in place:
- its available out of the box (in the RTL)
- it has all string functions in fully compatible way:
- can do "+" (via operator overload)
- can do pos(), copy(), delete() and friends via overloaded functions
- conversion from and to Unicode String (via operator overload ? )
- conversion to pchar (how ? )
- does reference counting, lazy copy and auto re-alloc on resizing
operations.
- TByteStringList (are there more relevant string handling objects)
is provided out of the box in a fully compatible and equally versatile way
- no performance degradation.
If this is not possible I vote for simply doing ByteString = ANSIString
(and TByteStringList = TANSIStringList) (provided that "ANSIString"
_is_ the pre 2009 String type as seemingly done in DXE).
-Michael
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus