Is there a way in C to parse a piece of text and obtain values for argv and argc, as if the text had been passed to an application on the command line?
This doesn\'
Unfortunately C++ but for others which might search for this kind of library i recommend:
ParamContainer - easy-to-use command-line parameter parser
Really small and really easy.
p.addParam("long-name", 'n', ParamContainer::regular,
"parameter description", "default_value");
programname --long-name=value
cout << p["long-name"];
>> value
From my experience: