Types
CommandLineArgs = distinct seq[(string, string)]
- Source Edit
Procs
proc `[]`(args: CommandLineArgs; key: string): string {....raises: [], tags: [], forbids: [].}
- Get a key out of the args. Case-sensitive. Returns an empty string if key is not present. Use a for loop to get duplicate keys. Source Edit
proc contains(args: CommandLineArgs; key: string): bool {....raises: [], tags: [], forbids: [].}
- Returns true if key is in the args. Case-sensitive. Source Edit
proc getCommandLineArgs(): CommandLineArgs {....raises: [], tags: [ReadIOEffect], forbids: [].}
- Returns the parsed command line arguments. See https://nim-lang.org/docs/parseopt.html for the supported syntax. Source Edit
proc getOrDefault(args: CommandLineArgs; key, default: string): string {. ...raises: [], tags: [], forbids: [].}
- Retrieves the value for key if it is in args, otherwise default is returned. Note, if key is present in args but the value is an empty string, that empty string will be returned instead of default. Source Edit
Converters
converter toBase(args: CommandLineArgs): lent seq[(string, string)] {. ...raises: [], tags: [], forbids: [].}
- Source Edit
converter toBase(args: var CommandLineArgs): var seq[(string, string)] {. ...raises: [], tags: [], forbids: [].}
- Source Edit