API:System.SysUtils.TMBCSEncoding.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); }
Eigenschaften
| Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
|---|---|---|---|---|
| function | class protected public |
System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TMBCSEncoding |
Beschreibung
Codiert Zeichen in eine Abfolge von Bytes. {{#multireplace:System.SysUtils.TMBCSEncoding.GetBytes|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} erbt von {{#multireplace:System.SysUtils.TEncoding.GetBytes|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. Der folgende Inhalt bezieht sich auf {{#multireplace:System.SysUtils.TEncoding.GetBytes|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.
Codiert Zeichen in eine Abfolge von Bytes.
TEncoding.GetBytes codiert den Chars-Parameter in eine Byte-Abfolge.
Chars kann ein Zeichen-Array oder ein Zeichenzeiger sein, der in eine Byte-Abfolge codiert werden soll.
S ist ein String des Typs UnicodeString, der in eine Byte-Abfolge codiert werden soll.
Der Parameter CharCount legt die Anzahl der zu codierenden Zeichen fest.
Bytes gibt die Position an, an der die Byte-Abfolge geschrieben werden soll.
ByteCount ist die maximale Byte-Anzahl, die an der angegebenen Position geschrieben werden kann.
Der Rückgabewert ist die Anzahl der tatsächlich codierten Bytes oder die TBytes-Abfolge.