A possible feature request: Make writef with %s call to!string for char* parameters

2011-07-11 Thread Andrej Mitrovic
import std.stdio; import std.string; void main() { char* foo = "foo\0".dup.ptr; writefln("Foo: %s", foo); } This will write the address of foo. Often when you link with C code you have C structures such as this: struct Info { char* name; char* info; } I think it would be convenie

Re: A possible feature request: Make writef with %s call to!string for char* parameters

2011-07-12 Thread Steven Schveighoffer
On Mon, 11 Jul 2011 16:37:12 -0400, Andrej Mitrovic wrote: import std.stdio; import std.string; void main() { char* foo = "foo\0".dup.ptr; writefln("Foo: %s", foo); } This will write the address of foo. Often when you link with C code you have C structures such as this: struct Info