System.SysUtils.TEncoding.GetBytes

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function GetBytes(Chars: PChar; CharCount: Integer; Bytes: PByte; ByteCount: Integer): Integer; overload; virtual; abstract;
function GetBytes(const Chars: Char): TBytes; overload; inline;
function GetBytes(const Chars: array of Char): TBytes; overload;
function GetBytes(const Chars: TCharArray): TBytes; overload;
function GetBytes(const Chars: array of Char; CharIndex, CharCount: Integer): TBytes; overload;
function GetBytes(const Chars: TCharArray; CharIndex, CharCount: Integer): TBytes; overload;
function GetBytes(const Chars: array of Char; CharIndex, CharCount: Integer;  const Bytes: TBytes; ByteIndex: Integer): Integer; overload;
function GetBytes(const Chars: TCharArray; CharIndex, CharCount: Integer;  const Bytes: TBytes; ByteIndex: Integer): Integer; overload;
function GetBytes(const S: string): TBytes; overload;
function GetBytes(const S: string; CharIndex, CharCount: Integer;  const Bytes: TBytes; ByteIndex: Integer): Integer; overload;

C++

virtual int __fastcall GetBytes(System::WideChar * Chars, int CharCount, System::PByte Bytes, int ByteCount) = 0 /* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(const System::WideChar Chars)/* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(System::WideChar const *Chars, const int Chars_High)/* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars)/* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(System::WideChar const *Chars, const int Chars_High, int CharIndex, int CharCount)/* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount)/* overload */;
int __fastcall GetBytes(System::WideChar const *Chars, const int Chars_High, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex)/* overload */;
int __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex)/* overload */;
System::DynamicArray<System::Byte> __fastcall GetBytes(const System::UnicodeString S)/* overload */;
int __fastcall GetBytes(const System::UnicodeString S, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex)/* overload */;

Propriétés

Type Visibilité  Source Unité  Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TEncoding

Description

Encode un ensemble de caractères en une séquence d'octets.

TEncoding.GetBytes encode le paramètre Chars en une séquence d'octets.

Chars peut être un tableau de caractères ou un pointeur caractère qui sera encodé en une séquence d'octets.

S est une chaîne de type UnicodeString à encoder en une séquence d'octets.

Le paramètre CharCount spécifie le nombre de caractères à encoder.

Bytes spécifie l'emplacement où sera écrite la séquence d'octets.

ByteCount est le nombre maximum d'octets pouvant être écrits à l'emplacement donné.

La valeur de retour est le nombre d'octets réellement encodés ou la séquence d'octets TBytes réelle.

Voir aussi