Rename std.string.toStringz?
Steven Schveighoffer
schveiguy at yahoo.com
Mon Jun 20 10:43:07 PDT 2011
On Mon, 20 Jun 2011 09:23:22 -0400, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Technically you're right. Yet I think it's pretty widespread that a sole
> char* means a zero-terminated string.
I think it's pretty widespread that you shouldn't be using zero-terminated
strings ;)
But I suppose it makes sense that to can convert from a char[] to a char
*, and if it does, it doesn't hurt to do the safest thing. I think it
should be discouraged, however, in favor of doing toUTFz which is more
descriptive as a function name.
-Steve
More information about the Digitalmars-d
mailing list