https://issues.dlang.org/show_bug.cgi?id=21045
Issue ID: 21045
Summary: std.getopt: Support blank as separator of multiple
values
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
I need to simulate an application written in C / C++ which supports passing
multiple argument values separated by space:
dmd -run sample.d --modelicalibs a b
``` d
import std;
void main(string[] args)
{
string[] modelicaLibs;
getopt(args, "modelicalibs", &modelicaLibs);
assert(modelicaLibs == ["a", "b"]);
}
```
As of today this is not supported by std.getopt. Could this be implemented?
References:
https://forum.dlang.org/post/[email protected]
https://github.com/dlang/phobos/pull/7557
--