API:System.SysUtils.TMBCSEncoding.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(System::WideChar const *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(System::WideChar const *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(System::WideChar const *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); }

Properties

Type Visibility Source Unit Parent
function
class protected
public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TMBCSEncoding

Description

Encodes a set of characters into a sequence of bytes.

System.SysUtils.TMBCSEncoding.GetBytes inherits from System.SysUtils.TEncoding.GetBytes. All content below this line refers to System.SysUtils.TEncoding.GetBytes.

Encodes a set of characters into a sequence of bytes.

TEncoding.GetBytes encodes Chars parameter into a sequence of bytes.

Chars can be a character array or a character pointer that will be encoded into a sequence of bytes.

S is a string of type UnicodeString that will be encoded into a sequence of bytes.

The CharCount parameter specifies the number of characters to encode.

Bytes specifies the location to write the sequence of bytes to.

ByteCount is 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.

See Also


Code Examples