System.SysUtils.IntToHex

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

Delphi

function IntToHex(Value: Int8): string;
function IntToHex(Value: UInt8): string;
function IntToHex(Value: Int16): string;
function IntToHex(Value: UInt16): string;
function IntToHex(Value: Int32): string;
function IntToHex(Value: UInt32): string;
function IntToHex(Value: Int64): string;
function IntToHex(Value: UInt64): string;
function IntToHex(Value: Integer; Digits: Integer): string;
function IntToHex(Value: Int64; Digits: Integer): string;
function IntToHex(Value: UInt64; Digits: Integer): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall IntToHex(System::Int8 Value)/* overload */;

プロパティ

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


説明

序数の 16 進数表現を返します。

IntToHex数値を、その数値を 16 進数で表記した文字列に変換します。

オーバーロードには 2 つの種類があります:

  1. 最初の 8 つのオーバーロード関数は、パラメータが 1つです。Value パラメータは、16 進数文字列用で、その Value パラメータ型のための固定長の十分なサイズがあります。たとえば、IntToHex (Value: Int16) は、4 桁の文字列を返します。これは、Int16 には 2 バイトで、これは 16 進数表現では 4 桁だからです。値の桁数が Value の型より少ない場合は、結果の文字列の左側がゼロで埋められます。
  2. 最後の 3 つのオーバーロード関数は、パラメータが 2 つです。 Value は変換する数で、Digits は返す16 進数の最小桁数を示します。値の桁数が Digits パラメータより少ない場合は、結果の文字列の左側がゼロで埋められます。

関連項目

コード サンプル