Thread overview
char* to string
Nov 04, 2009
BLS
Nov 04, 2009
BLS
November 04, 2009
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
November 04, 2009
On 05/11/2009 00:11, BLS wrote:
> char* xxx()

better
char* xxx(char* a, char* b)
{
  string A = ????
}


November 05, 2009
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