Overload List
Overload 1: class function Parse(const Value: Boolean): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Boolean |
Returns: Substring
Overload 2: class function Parse(const Value: Double): Substr.Substring; overload; static;
The text of a Double as FloatToStr writes it, its 15 significant digits correctly rounded, held inline.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
Returns: Substring - FloatToStr's text: digits, the decimal separator of FormatSettings, an exponent where FloatToStr writes one; NAN, INF or -INF.
Examples
Texts without a decimal separator.
uses Substr;
procedure Example;
begin
Assert(Substring.Parse(2.0) = '2');
Assert(Substring.Parse(1e20) = '1E20');
end;
See Also: Substr.FloatToStr
Overload 3: class function Parse(const Value: Double; const Format: TFloatFormat; const Precision, Digits: Integer): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
| 2 | Format | TFloatFormat | |
| 3 | Precision | Integer | |
| 4 | Digits | Integer |
Returns: Substring
Overload 4: class function Parse(const Value: Double; const Format: TFloatFormat; const Precision, Digits: Integer; const AFormatSettings: TFormatSettings): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Double | scalar |
| 2 | Format | TFloatFormat | |
| 3 | Precision | Integer | |
| 4 | Digits | Integer | |
| 5 | AFormatSettings | TFormatSettings |
Returns: Substring
Overload 5: class function Parse(const Value: Int64): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Int64 |
Returns: Substring
Overload 6: class function Parse(const Value: Integer): Substr.Substring; overload; static;
The text of a number or a Boolean, as IntToStr and BoolToStr write it, held inline.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Integer |
Returns: Substring - IntToStr's digits; for a Boolean, '-1' for True and '0' for False.
Examples
Numbers and Booleans.
uses Substr;
procedure Example;
begin
Assert(Substring.Parse(-17) = '-17');
Assert(Substring.Parse(Int64(9000000000)) = '9000000000');
Assert(Substring.Parse(True) = '-1');
end;
See Also: Substr.IntToStr, Substr.IntToStr
Overload 7: class function Parse(const Value: Single; const Format: TFloatFormat; const Precision, Digits: Integer): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Single | scalar |
| 2 | Format | TFloatFormat | |
| 3 | Precision | Integer | |
| 4 | Digits | Integer |
Returns: Substring
Overload 8: class function Parse(const Value: Single; const Format: TFloatFormat; const Precision, Digits: Integer; const AFormatSettings: TFormatSettings): Substr.Substring; overload; static;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Value | Single | scalar |
| 2 | Format | TFloatFormat | |
| 3 | Precision | Integer | |
| 4 | Digits | Integer | |
| 5 | AFormatSettings | TFormatSettings |
Returns: Substring