GetoptStdc extension
<getopt.h> standard and GNU extensions for stdc.
- on
Properties
- optarg ↔ String?
-
Available on Stdc, provided by the GetoptStdc extension
For communication fromgetoptto the caller. Whengetoptfinds an option that takes an argument, the argument value is stored here.getter/setter pair - opterr ↔ int
-
Available on Stdc, provided by the GetoptStdc extension
Ifopterris set to 0,getoptdoes not print an error message.getter/setter pair - optind ↔ int
-
Available on Stdc, provided by the GetoptStdc extension
Index of the next element to be processed in argv. The system initializes this value to 1.getter/setter pair - optopt ↔ int
-
Available on Stdc, provided by the GetoptStdc extension
Whengetoptencounters an unknown option character or an option with a missing required argument, it stores that option character in this variable.getter/setter pair
Methods
-
getopt(
int argc, List< String> argv, String optstring) → int -
Available on Stdc, provided by the GetoptStdc extension
Parses command-line arguments. -
getopt_long(
int argc, List< String> argv, String optstring, List<Option> longopts, [List<int> ? longindex]) → int -
Available on Stdc, provided by the GetoptStdc extension
Parses long options in addition to short options. -
optreset(
) → void -
Available on Stdc, provided by the GetoptStdc extension
Resets the internalgetoptstate.