bearophile wrote: > std.conv.text() may be better there (untested): Cool! I never realized that function existed.
It might be a nice enhancement to add a ctext() that returns the string zero-terminated and as a char* for use with C functions. (Actually, I think C functions should take ubyte* instead of char* because they aren't necessarily UTF-8 but most bindings don't do this so char* might work better in practice. Or maybe inventing a new typedef or struct just for C is the best.) While toStringz does this, a helper function might make C libraries just a little easier and safer to use.
