System.Classes.BinToHex
Delphi
procedure BinToHex(const Buffer: TBytes; BufOffset: Integer; var Text: TBytes; TextOffset: Integer; Count: Integer);
procedure BinToHex(Buffer: PAnsiChar; Text: PAnsiChar; BufSize: Integer);
procedure BinToHex(Buffer: PAnsiChar; Text: PWideChar; BufSize: Integer);
procedure BinToHex(var Buffer; Text: PWideChar; BufSize: Integer);
procedure BinToHex(var Buffer; Text: PAnsiChar; BufSize: Integer);
procedure BinToHex(Buffer: Pointer; Text: PWideChar; BufSize: Integer);
procedure BinToHex(Buffer: Pointer; Text: PAnsiChar; BufSize: Integer);
C++
extern DELPHI_PACKAGE void __fastcall BinToHex(const System::DynamicArray<System::Byte> Buffer, int BufOffset, System::DynamicArray<System::Byte> &Text, int TextOffset, int Count)/* overload */;
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | System.Classes.pas System.Classes.hpp |
System.Classes | System.Classes |
Description
Converts a binary value into a string that is its hexadecimal representation.
Call BinToHex to convert the binary value Buffer into a string that is its hexadecimal representation.
This procedure receives the following parameters:
| Parameter | Description |
|---|---|
|
|
Pointer to an array of bytes. For example: |
|
|
Number of bytes to skip at the beginning of the input array of bytes. For example, if |
|
|
Pointer to the string that will receive the value of the input bytes as a string of hexadecimal characters. For example, for the input bytes
|
|
|
Number of characters to skip at the beginning of the input string. For example, if |
|
|
Number of bytes (pairs of hexadecimal characters) from the input array of bytes to convert into the output string.
|
You can call BinToHex with or without specifying an offset for the input string (TextOffset) or the output buffer (BufOffset). However, you must specify either both offsets or specify none of them.