On Wed, Oct 19, 2011 at 10:11 AM, Mattias Gaertner
wrote:
> I never saw such code for ansistring. Only for shortstring.
Indeed, I copied some code from the RTL and it seams that I
inadvertedly copied code for shortstring instead of ansistring =o
I fixed this in rev 32977 in the Pascal Widestring
Felipe Monteiro de Carvalho hat am 19.
Oktober 2011 um 09:13 geschrieben:
> Hello,
>
> Usually when we work with PChars we do things like this to set the
> final terminator:
>
> var
> ansistr: ansistring;
> begin
> // Copy the originating string taking into account the specified length
>
2011/10/19 Tomas Hajny :
> Sorry for a silly question, but why the difference between the two
> implementations (i.e. why not addressing the WideStr element directly
> without the typecast)?
Actually it should be a pointer operation in the ansistring version
too, because setting chars in a string
On Wed, October 19, 2011 09:13, Felipe Monteiro de Carvalho wrote:
Hi,
> Usually when we work with PChars we do things like this to set the
> final terminator:
>
> var
> ansistr: ansistring;
> begin
> // Copy the originating string taking into account the specified length
> SetLength(ansis
Am 19.10.2011 09:13, schrieb Felipe Monteiro de Carvalho:
Hello,
Usually when we work with PChars we do things like this to set the
final terminator:
var
ansistr: ansistring;
begin
// Copy the originating string taking into account the specified length
SetLength(ansistr, len+1);
Sys