Re: toString(char*)?

2010-10-11 Thread Tomek Sowiński
Lars T. Kyllingstad napisał: > I don't think it works the other way, though, you still have to use > std.string.toStringz(). Most (all?) conversions in std.conv implement the whole round-trip, there's no reason for string <-> char* to be any different. File a bug and see what happens. -- Tome

Re: toString(char*)?

2010-10-11 Thread Lars T. Kyllingstad
On Mon, 11 Oct 2010 22:00:37 +0200, Lutger wrote: > Lars T. Kyllingstad wrote: > >> On Mon, 11 Oct 2010 21:46:26 +0200, Lutger wrote: >> >>> Where can I find the function to convert from c-style string to a >>> normal D string? It used to be toString in std.string, but that one is >>> deprecated

Re: toString(char*)?

2010-10-11 Thread Lutger
Lars T. Kyllingstad wrote: > On Mon, 11 Oct 2010 21:46:26 +0200, Lutger wrote: > >> Where can I find the function to convert from c-style string to a normal >> D string? It used to be toString in std.string, but that one is >> deprecated. >> >> Thanks. > > import std.conv; > > const char* cStr

Re: toString(char*)?

2010-10-11 Thread Lars T. Kyllingstad
On Mon, 11 Oct 2010 21:46:26 +0200, Lutger wrote: > Where can I find the function to convert from c-style string to a normal > D string? It used to be toString in std.string, but that one is > deprecated. > > Thanks. import std.conv; const char* cString; string dString = to!string(cString) -La

toString(char*)?

2010-10-11 Thread Lutger
Where can I find the function to convert from c-style string to a normal D string? It used to be toString in std.string, but that one is deprecated. Thanks.