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, Winapi::Windows::PByte Bytes, int ByteCount)/* overload */;
inline TBytes __fastcall  GetBytes(const System::WideChar Chars){ return TEncoding::GetBytes(Chars); }
inline TBytes __fastcall  GetBytes(const System::WideChar *Chars, const System::NativeInt Chars_High){ return TEncoding::GetBytes(Chars, Chars_High); }
inline TBytes __fastcall  GetBytes(const TCharArray Chars){ return TEncoding::GetBytes(Chars); }
inline TBytes __fastcall  GetBytes(const System::WideChar *Chars, const System::NativeInt Chars_High, int CharIndex, int CharCount){ return TEncoding::GetBytes(Chars, Chars_High, CharIndex, CharCount); }
inline TBytes __fastcall  GetBytes(const TCharArray Chars, int CharIndex, int CharCount){ return TEncoding::GetBytes(Chars, CharIndex, CharCount); }
inline int __fastcall  GetBytes(const System::WideChar *Chars, const System::NativeInt Chars_High, int CharIndex, int CharCount, const TBytes Bytes, int ByteIndex){ return TEncoding::GetBytes(Chars, Chars_High, CharIndex, CharCount, Bytes, ByteIndex); }
inline int __fastcall  GetBytes(const TCharArray Chars, int CharIndex, int CharCount, const TBytes Bytes, int ByteIndex){ return TEncoding::GetBytes(Chars, CharIndex, CharCount, Bytes, ByteIndex); }
inline TBytes __fastcall  GetBytes(const System::UnicodeString S){ return TEncoding::GetBytes(S); }
inline int __fastcall  GetBytes(const System::UnicodeString S, int CharIndex, int CharCount, const TBytes Bytes, int ByteIndex){ return TEncoding::GetBytes(S, CharIndex, CharCount, Bytes, ByteIndex); }
inline int __fastcall  GetBytes(const System::UnicodeString S, int CharIndex, int CharCount, const TBytes 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 TMBCSEncoding

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.

See Also