Re: [ooc-compiler] Deep-copying STRING
Brought to you by:
mva
|
From: Michael v. A. <Mic...@de...> - 2004-03-16 13:06:56
|
Frank Copeland <fj...@wo...> writes:
> I need to do a deep copy of a variable of type STRING. What's the method?
> All I can find in the documentation is that STRING is a synonym for
> Object.String.
>
> Do I just do:
>
> VAR newstring : STRING;
>
> NEW (newstring);
> newstring^ := oldstring^;
This is probably the best approach. An alternative is
newstring := oldstring.Concat("")
-- mva
|