Re: Interfacing C programs: Pass D string to C function

2013-12-13 Thread Ithy
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

Allowing string value with getopt without requiring it

2013-12-12 Thread Ithy
Hello. I'm just getting into D (literally writing my first program), and I can't figure out how to do this with getopt: I want to have the option --log, which will enable logging (set a bool variable to true). However, I want the program to also accept --log=filename to allow the user to defin