[Issue 2093] string concatenation modifies original
Denis Koroskin
2korden at gmail.com
Sat Nov 22 04:28:38 PST 2008
22.11.08 в 12:58 в своём письме писал(а):
> http://d.puremagic.com/issues/show_bug.cgi?id=2093
>
>
>
>
>
> ------- Comment #5 from ddparnell at bigpond.com 2008-11-22 03:58 -------
>
> I thought 'string' types were immutable and thus ...
>
> s1.length = 0;
>
> should fail as it updates the string (trucates it to zero characters).
>
>
No, string is a mutable array of immutable chars:
string == const(char)[]
More information about the Digitalmars-d-bugs
mailing list