System.SysUtils.TStringHelper.ToSingle
Delphi
class function ToSingle(const S: string): Single; overload; static; inline;
function ToSingle: Single; overload; inline;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas | System.SysUtils | TStringHelper |
Description
Converts a given string to a floating-point value.
This method is overloaded.
Use ToSingle to convert a string S
, to a floating-point value. S
must consist of an optional sign (+ or -), a string of digits with an optional decimal point, and an optional mantissa. The mantissa consists of 'E' or 'e' followed by an optional sign (+ or -) and a whole number. Leading and trailing blanks are ignored.