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

GLB_JSON_STD_DECIMALSEPARATOR #14

Open
hafedh-trimeche opened this issue Jun 22, 2021 · 0 comments
Open

GLB_JSON_STD_DECIMALSEPARATOR #14

hafedh-trimeche opened this issue Jun 22, 2021 · 0 comments

Comments

@hafedh-trimeche
Copy link
Contributor

Hi,
JsonsUtils_GLB_DECIMALSEPARATOR would be replaced by GLB_JSON_STD_DECIMALSEPARATOR and not the opposite:

function FixedTryStrToFloat(const S: string; out Value: Extended): Boolean;
var
  FixedS: string;
begin
  if JsonsUtils_GLB_DECIMALSEPARATOR = GLB_JSON_STD_DECIMALSEPARATOR then
  begin
    Result := TryStrToFloat(S, Value);
  end
  else
  begin
    FixedS := StringReplace( S,
                             JsonsUtils_GLB_DECIMALSEPARATOR,
                             GLB_JSON_STD_DECIMALSEPARATOR,
                             [rfReplaceAll]);
    Result := TryStrToFloat(FixedS, Value);
  end;
end;

Best regards.

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