The great slice debate -- should slices be separated from arrays?

Steven Schveighoffer schveiguy at yahoo.com
Tue Nov 24 06:32:19 PST 2009


On Tue, 24 Nov 2009 09:27:22 -0500, Steven Schveighoffer  
<schveiguy at yahoo.com> wrote:
> This stomping becomes more of a problem for library writers:
>
> char * toStringZ(string s)
> {
>     s ~= '\0';
>     return s.ptr;
> }

Apologies, this should be written:

immutable(char) * toStringZ(string s)


-Steve



More information about the Digitalmars-d mailing list