CommandLine
extension CommandLine
-
Parse the command line arguments to get the settings for this execution context.
Declaration
Swift
static func parse() -> CommandLineArgumentsReturn Value
A structure that contains the argument data.
-
Parse the command line arguments to get the settings for this execution context.
Declaration
Swift
static func parse(_ arguments: [String]) -> CommandLineArgumentsParameters
argumentsThe list of arguments to parse.
Return Value
A structure that contains the argument data.
-
Get the resulting value of a passed argument.
Declaration
Swift
static func getArgument(of flag: String) -> String?Parameters
flagThe argument to get the value of.
Return Value
The string value from the argument, or nil if it doesn’t exit.
-
Get the resulting value of a passed argument.
Declaration
Swift
static func getArgument(of flag: String, from args: [String]) -> String?Parameters
flagThe argument to get the value of.
argsThe list of arguments to retrieve values from.
Return Value
The string value from the argument, or nil if it doesn’t exit.