System.SysUtils.TUnicodeEncoding.GetBytes

From RAD Studio API Documentation
Jump to: navigation, search

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 TUnicodeEncoding

Description

Encodes a set of characters into a sequence of bytes.

GetBytes encodes the 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 that will 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 actually encoded bytes or the TBytes sequence of bytes.

See Also