TStringHelper.ToInteger
Convert string to 32-bit signed integer
Declaration
Source position: syshelph.inc line 97
public
class function ToInteger(const S: string) : Integer; Overload; Static;
function ToInteger : Integer; Overload;
Description
ToInteger returns the contents of the string S as a 32-bit signed integer value (if possible). It uses StrToInt64 to convert the value to an 64-bit sized integer value.
Errors
If the string contains a value that cannot be translated to an integer value, an EConvertError exception may be raised.
See also
| Name | Description |
|---|---|
| EConvertError | Conversion error. |
| StrToInt64 | Convert a string to an Int64 value. |
| TStringHelper.ToBoolean | Convert string to boolean |
| TStringHelper.ToDouble | Convert string to double-sized floating point value |
| TStringHelper.ToExtended | Convert string to extended-sized floating point value |
| TStringHelper.ToInt64 | Convert string to 64-bit signed integer |
| TStringHelper.ToSingle | Convert string to single-sized floating point value |