function FloatToStr(const Value: Double): Substring; overload; inline;
The text of Value with up to 15 significant digits, correctly rounded.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
Returns: Substring
Remarks:
Call it qualified: Substr.FloatToStr(x).
Examples
Texts without a decimal separator.
uses Substr, System.SysUtils;
procedure Example;
begin
Assert(Substr.FloatToStr(1e20) = '1E20');
Assert(Substr.FloatToStr(-3.0) = '-3');
end;