paramSupport

Evaluate ParamSupport flags for application Exec command.

@nogc @safe
paramSupport
pure nothrow
(
in string[] execArgs
)

Parameters

execArgs
Type: string[]

Array of unescaped and unquoted arguments.

Examples

1 assert(paramSupport(["program", "%f"]) == ParamSupport.file);
2 assert(paramSupport(["program", "%%f"]) == ParamSupport.none);
3 assert(paramSupport(["program", "%%%f"]) == ParamSupport.file);
4 assert(paramSupport(["program", "%u"]) == ParamSupport.url);
5 assert(paramSupport(["program", "%i"]) == ParamSupport.none);
6 assert(paramSupport(["program", "%u%f"]) == (ParamSupport.url | ParamSupport.file ));
7 assert(paramSupport(["program", "%F"]) == ParamSupport.files);
8 assert(paramSupport(["program", "%U"]) == ParamSupport.urls);
9 assert(paramSupport(["program", "%f", "%U"]) == (ParamSupport.file|ParamSupport.urls));
10 assert(paramSupport(["program", "%F", "%u"]) == (ParamSupport.files|ParamSupport.url));

See Also

Meta