System.SysUtils.IntToHex
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 */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Returns the hex representation of an ordinal number.
IntToHex converts a number into a string containing the number's hexadecimal (base 16) representation.
There are two kinds of overloaded versions:
- First eight overloaded functions that have one parameter. The Value parameter to a hexadecimal string with a fixed and enough size of the Value parameter type. For example, IntToHex (Value: Int16) returns a 4 digits string, because Int16 has 2 bytes and 4 digits as the Hexadecimal representation. If the value has fewer digits from the type of Value, the resulting string is left-padded with zeros.
- Last three overloaded functions that have two parameters. The Value is the number to convert, the Digits indicate the minimum number of hexadecimal digits to return. If the value has fewer digits than the Digits parameter, the resulting string is left-padded with zeros.
See Also
- IntToStr
- TByteHelper.ToHexString
- TWordHelper.ToHexString
- TCardinalHelper.ToHexString
- TUInt64Helper.ToHexString
- TShortIntHelper.ToHexString
- TSmallIntHelper.ToHexString
- TIntegerHelper.ToHexString
- TInt64Helper.ToHexString