www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - char* to string

reply BLS <windevguy hotmail.de> writes:
HI,
I would like to use some pbobos string based functions within an DLL.
Unfortunately all I can do is to pass char* parameters from the callee 
side.

Now I want to use f.i. std.regex

export extern(windows) char* xxx()


//Heck were is Jarret when I need him most ?

D2,beside

Björn
Nov 04 2009
parent reply BLS <windevguy hotmail.de> writes:
On 05/11/2009 00:11, BLS wrote:
 char* xxx()
better char* xxx(char* a, char* b) { string A = ???? }
Nov 04 2009
parent "Lars T. Kyllingstad" <public kyllingen.NOSPAMnet> writes:
BLS wrote:
 On 05/11/2009 00:11, BLS wrote:
 char* xxx()
better char* xxx(char* a, char* b) { string A = ???? }
std.conv.to() is your friend. Man, I love that function! import std.conv; char* xxx(char* a, char* b) { string A = to!string(a); } -Lars
Nov 05 2009