[fpc-devel] new string - question on usage
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Thu Oct 13 03:13:46 CEST 2011
Sven Barth schrieb:
> http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/astrings.inc?revision=19444&view=markup
I don't understand the use of encoding 0 and CP_NONE in FPC. Can
somebody explain?
Furthermore I suspect that the implementation of
Function Pos(Const Substr : RawByteString; Const Source : RawByteString)
: SizeInt;
is wrong. The comparison must take into account the encodings of both
strings.
Function Pos(c : AnsiChar; Const s : RawByteString) : SizeInt;
is questionable at all, when the encoding of the arguments is unknown or
ignored (as is).
I have the bad impression that the implementors didn't understand the
purpose and correct use of RawByteString, or try to implement something
incompatible with Delphi :-(
DoDi
More information about the fpc-devel
mailing list