TCustomApplication.FindOptionIndex function
Return the index of an option.
Declaration
function FindOptionIndex(const S: string; var Longopt: Boolean;
StartAt: Integer=- 1): IntegerArguments
S | Short option to search for. |
Longopt | Long option to search for. |
StartAt | Index to start searching for option. |
Function result
Position on commandline of option.
Description
FindOptionIndex will return the index of the option
S
or the long option
LongOpt. Neither of them should include the
switch character. If no such option was specified, -1 is returned. If either
the long or short option was specified, then the position on the
command-line is returned.
Depending on the value of the CaseSensitiveOptions property, the search is performed case sensitive or case insensitive.
Options are identified as command-line parameters which start with OptionChar (by default the dash ('-') character).
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
