Rename std.string.toStringz?

Kagamin spam at here.lot
Fri Jun 17 00:03:18 PDT 2011


Daniel Gibson Wrote:

> No.
> The whole point of toStringz() is that it returns a string that can be
> fed to normal C functions that work on strings.
> And C functions expect a "string" to be a char* (or wchar*) pointing to
> a block of memory containing the string and terminated by '\0'.
> The functionality of toStringz() should not change.
> This is just about the name.

Why don't you like to!c_str(); ?


More information about the Digitalmars-d mailing list