www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21045] New: std.getopt: Support blank as separator of


          Issue ID: 21045
           Summary: std.getopt: Support blank as separator of multiple
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: andre s-e-a-p.de

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?

https://forum.dlang.org/post/nafdmeyxcqythfcbdomu forum.dlang.org

Jul 15 2020