Show: Object Pascal C++
Display Preferences

System.SysUtils.StrToInt

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

function StrToInt(const S: string): Integer;

C++

extern DELPHI_PACKAGE int __fastcall StrToInt(const System::UnicodeString S)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Converts a string that represents an integer (decimal or hex notation) into a number.

StrToInt converts the string S, which represents an integer-type number in either decimal or hexadecimal notation, into a number. If S does not represent a valid number, StrToInt raises an EConvertError exception.

StrToInt supports strings in the following hexadecimal notations:

  • Object Pascal: 0$1234 and 0x1234.
  • C++: 0x1234.

See Also


Code Examples

Personal tools
Translations