System.SysUtils.TEncoding.GetByteCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetByteCount(Chars: PChar; CharCount: Integer): Integer; overload; virtual; abstract;
function GetByteCount(const Chars: Char): Integer; overload; inline;
function GetByteCount(const Chars: array of Char): Integer; overload;
function GetByteCount(const Chars: TCharArray): Integer; overload;
function GetByteCount(const Chars: array of Char; CharIndex, CharCount: Integer): Integer; overload;
function GetByteCount(const Chars: TCharArray; CharIndex, CharCount: Integer): Integer; overload;
function GetByteCount(const S: string): Integer; overload;
function GetByteCount(const S: string; CharIndex, CharCount: Integer): Integer; overload;

C++

virtual int __fastcall GetByteCount(System::WideChar * Chars, int CharCount) = 0 /* overload */;
int __fastcall GetByteCount(const System::WideChar Chars)/* overload */;
int __fastcall GetByteCount(System::WideChar const *Chars, const int Chars_High)/* overload */;
int __fastcall GetByteCount(const System::DynamicArray<System::WideChar> Chars)/* overload */;
int __fastcall GetByteCount(System::WideChar const *Chars, const int Chars_High, int CharIndex, int CharCount)/* overload */;
int __fastcall GetByteCount(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount)/* overload */;
int __fastcall GetByteCount(const System::UnicodeString S)/* overload */;
int __fastcall GetByteCount(const System::UnicodeString S, int CharIndex, int CharCount)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TEncoding

Description

Returns the number of bytes generated by encoding Chars.

Returns the number of bytes generated by encoding Chars. Note that the number of bytes in a string is not necessarily exactly proportional to the number of characters in a given character array or string.

The Chars parameter can be a character array or a character pointer containing the bytes to be counted.

The S parameter refers to a UnicodeString from which the Byte count will be extracted.

The CharCount parameter specifies the number of characters to encode.

The CharIndex parameter indicates the index within the Chars array where counting should begin.

The CharCount parameter indicates the number of characters that should be included when counting the bytes.

The Return Value is the number of bytes in the passed Chars or S parameter.

See Also


Code Examples