ArgumentExtractor

    A rudimentary helper for extracting options and flags from a string list representing command line arguments. The idea is to extract all known options and flags, leaving just the positional arguments. This does not handle well the case in which positional arguments (or option argument values) happen to have the same name as an option or a flag. It only handles the long --<name> form of options, but it does respect -- as an indication that all remaining arguments are positional.

    ArgumentExtractor.swift:14
    struct ArgumentExtractor

    Citizens in PackagePlugin

    Type members

    • init([String])

      Initializes a ArgumentExtractor with a list of strings from which to extract flags and options. If the list contains --, any arguments that follow it are considered to be literals.

    Instance members