SysUtils单元FindCmdLineSwitch方法使用注解

相关声明:

type TSysCharSet = set of Char;

function FindCmdLineSwitch(const Switch: string; const Chars: TSysCharSet; IgnoreCase: Boolean): Boolean;

描述:

如果调用当前进程的命令行参数中包含了Switch参数指定的字符串, 函数返回值True,否则返回False 

Chars参数是特殊字符集合(例如,“-”和“/”是常见的),可以用来解析字符串。

ignoreCase参数控制是否大小写敏感或不敏感。

例如:
//executed as: AppName.exe /help
var 
  s : string; sc: TSysCharSet; begin  s:='help';  sc:=['/','-','|'];  if FindCmdLineSwitch(s,sc,False) then ShowMessage('Application called with HELP parameter!');
end;
原文地址:https://www.cnblogs.com/jiqiwoniu/p/4428449.html