On Friday, December 13, 2013 01:17:41 Jonathan M Davis wrote:
> or you could do something like
>
> auto cstr = str.dup.ptr;
Wait. That was stupid of me. Don't do this. It'll give you a char*, but it
won't be null-terminated. If you need char*, then use toUTFz!(char*) - though
from what Mike's s
On 12/13/2013 5:00 PM, Dfr wrote:
Hello
I trying to write simple wrapper around pcre and have problem passing
strings to it. As i understood, the best way is std.string.toStringZ.
So, my code look like:
string pattern = "";
pcre_compile2( toStringz(pattern), options, &errcode, &errmsg,
&er
On Friday, December 13, 2013 09:00:20 Dfr wrote:
> Hello
>
> I trying to write simple wrapper around pcre and have problem
> passing strings to it. As i understood, the best way is
> std.string.toStringZ.
>
> So, my code look like:
>
> string pattern = "";
> pcre_compile2( toStringz(pattern)
On Friday, 13 December 2013 at 08:00:21 UTC, Dfr wrote:
Hello
I trying to write simple wrapper around pcre and have problem
passing strings to it. As i understood, the best way is
std.string.toStringZ.
So, my code look like:
string pattern = "";
pcre_compile2( toStringz(pattern), optio
Hello
I trying to write simple wrapper around pcre and have problem
passing strings to it. As i understood, the best way is
std.string.toStringZ.
So, my code look like:
string pattern = "";
pcre_compile2( toStringz(pattern), options, &errcode, &errmsg,
&erroffset, cast(char*)null);
T