Thread overview | |||||
---|---|---|---|---|---|
|
November 04, 2009 char* to string | ||||
---|---|---|---|---|
| ||||
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 Re: char* to string | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLS | On 05/11/2009 00:11, BLS wrote:
> char* xxx()
better
char* xxx(char* a, char* b)
{
string A = ????
}
|
November 05, 2009 Re: char* to string | ||||
---|---|---|---|---|
| ||||
Posted in reply to BLS | 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
|
Copyright © 1999-2021 by the D Language Foundation