Skip to content

GLB_JSON_STD_DECIMALSEPARATOR #14

@hafedh-trimeche

Description

@hafedh-trimeche

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions