Skip to content

Commit ac7fc44

Browse files
authored
Merge pull request #150 from pjrobin/Feature_ParamExists_CUstom_Separator
Modifies ParamExists to accept custom ValueSeparator
2 parents bb443b2 + bc70ff4 commit ac7fc44

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Quick.Parameters.pas

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ TParam = class
187187
{$ENDIF}
188188
function GetHelp : TStringList;
189189
property Help : Boolean read fHelp write fHelp;
190-
function ExistsParam(const aParam : string): Boolean; overload;
190+
function ExistsParam(const aParam : string; const aValueSeparator : string = ''): Boolean; overload;
191191
end;
192192
{$M-}
193193

@@ -315,12 +315,13 @@ function TParameters.CheckHelpSwitch: Boolean;
315315
end;
316316
end;
317317

318-
function TParameters.ExistsParam(const aParam : string): Boolean;
318+
function TParameters.ExistsParam(const aParam : string; const aValueSeparator : string = ''): Boolean;
319319
var
320320
param : TParam;
321321
begin
322322
param := TParam.Create;
323323
param.Name := aParam;
324+
if not aValueSeparator.IsEmpty then param.ValueSeparator := aValueSeparator;
324325
param.Alias := '';
325326
try
326327
Result := ExistParam(param,param.Name);

0 commit comments

Comments
 (0)