System.SysUtils.TBigEndianUnicodeEncoding.GetBytes
Delphi
function GetBytes(Chars: PChar; CharCount: Integer; Bytes: PByte; ByteCount: Integer): Integer; overload; override;
C++
virtual int __fastcall GetBytes(System::WideChar * Chars, int CharCount, System::PByte Bytes, int ByteCount)/* overload */;
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::WideChar Chars){ return TEncoding::GetBytes(Chars); }
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::WideChar *Chars, const int Chars_High){ return TEncoding::GetBytes(Chars, Chars_High); }
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars){ return TEncoding::GetBytes(Chars); }
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::WideChar *Chars, const int Chars_High, int CharIndex, int CharCount){ return TEncoding::GetBytes(Chars, Chars_High, CharIndex, CharCount); }
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount){ return TEncoding::GetBytes(Chars, CharIndex, CharCount); }
inline int __fastcall GetBytes(const System::WideChar *Chars, const int Chars_High, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex){ return TEncoding::GetBytes(Chars, Chars_High, CharIndex, CharCount, Bytes, ByteIndex); }
inline int __fastcall GetBytes(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex){ return TEncoding::GetBytes(Chars, CharIndex, CharCount, Bytes, ByteIndex); }
inline System::DynamicArray<System::Byte> __fastcall GetBytes(const System::UnicodeString S){ return TEncoding::GetBytes(S); }
inline int __fastcall GetBytes(const System::UnicodeString S, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex){ return TEncoding::GetBytes(S, CharIndex, CharCount, Bytes, ByteIndex); }
inline int __fastcall GetBytes(const System::UnicodeString S, int CharIndex, int CharCount, const System::DynamicArray<System::Byte> Bytes, int ByteIndex, const int StringBaseIndex){ return TEncoding::GetBytes(S, CharIndex, CharCount, Bytes, ByteIndex, StringBaseIndex); }
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | class protected public |
System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TBigEndianUnicodeEncoding |
Description
Encodes a set of characters into a sequence of bytes.
GetBytes encodes a Chars parameter into a sequence of bytes. The following table lists the parameters expected by this method and their description.
Parameter | Description |
---|---|
Chars |
A character array or a character pointer to be encoded into a sequence of bytes. |
CharCount |
Specifies the number of characters to encode. |
Bytes |
Specifies the location to write the sequence of bytes to. |
ByteCount |
The maximum number of bytes that can be written to the given location. |
The return value is the number of bytes actually encoded or the actual TBytes sequence of bytes.