[fpc-devel] strcopy, strlcopy for PWideChar
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Mon Aug 15 18:41:53 CEST 2011
LacaK schrieb:
>>> Or do you not like these "wide" versions at all ?
>>
>> It's not a matter of liking, I'm afraid. If Delphi has them, we'll
>> have to add them too :-)
>>
>> Can you please add an entry in the bug tracker, so we don't forget ?
>>
> http://bugs.freepascal.org/view.php?id=19989
> Do you think, that it is realistic expect them in 1-2 months ?
Supply an patch, to speed up the implementation.
But first the Delphi implementations should be explored, since the
following looks not okay to me:
"StrLCopy copies a maximum MaxLen characters from Source to Dest, then
adds a null terminator to Dest and returns Dest. The SizeOf standard
function (Delphi) or the sizeof operator (C++) can be used to determine
the MaxLen parameter. Usually, MaxLen equals SizeOf(Dest)-1."
The mix (or equivalence) of character and byte counts obviously is
inappropriate for "wide" versions. Perhaps "sizeof" should read "Length"?
DoDi
More information about the fpc-devel
mailing list