Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TParameters.function ExistsParam(const aParam, aValueSeparator : string) searches only with default ValueSeparator #135

Open
pjrobin opened this issue Sep 30, 2024 · 0 comments

Comments

@pjrobin
Copy link

pjrobin commented Sep 30, 2024

The function TParams.function ExistsParam(const aParam : string) will only search using the default ValueSeparator "=".
My fix would be to add a second parameter to the function:

function TParameters.ExistsParam(const aParam, aValueSeparator : string): Boolean;
var
  param : TParam;
begin
  param := TParam.Create;
  param.ValueSeparator := aValueSeparator;
  param.Name := aParam;
  param.Alias := '';
  try
    Result := ExistParam(param,param.Name);
  finally
    param.Free;
  end;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant