System.SysUtils.StrToIntDef

提供: RAD Studio API Documentation
移動先: 案内検索

Delphi

function StrToIntDef(const S: string; Default: Integer): Integer;

C++

extern DELPHI_PACKAGE int __fastcall StrToIntDef(const System::UnicodeString S, int Default)/* overload */;

プロパティ

種類 可視性 ソース ユニット
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils


説明

整数(10 進数または 16 進数)を表す文字列を、エラー コードの数値に変換します。

StrToIntDef は、10 進か 16 進の整数型数値を表す文字列 S を数値に変換します。 S が有効な数値、StrToIntDef を表していない場合、Default を返します。

StrToIntDef は、次の 16 進数表記の文字列をサポートしています:

  • Delphi: 0$1234 と 0x1234
  • C++: 0x1234

関連項目


コード サンプル