main.d(61): Error: temp_[i_] isn't mutable

Ben Hanson Ben.Hanson at tfbplc.co.uk
Sat Jun 19 12:56:48 PDT 2010


Hi Justin,

== Quote from Justin Spahr-Summers (Justin.SpahrSummers at gmail.com)'s article
> "string" is actually an alias for "immutable(char)[]" (and similarly for
> the other string types), so its contents are not modifiable, though its
> length can be adjusted and contents appended. If you need to be able to
> modify the characters, just use char[] instead. You can then use the
> .idup property to get a string afterward.

Thanks for the clarification!

Regards,

Ben


More information about the Digitalmars-d mailing list