API:System.SysUtils.TMBCSEncoding.GetByteCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function GetByteCount(Chars: PChar; CharCount: Integer): Integer; overload; override;

C++

virtual int __fastcall GetByteCount(System::WideChar * Chars, int CharCount)/* overload */;
inline int __fastcall  GetByteCount(const System::WideChar Chars){ return TEncoding::GetByteCount(Chars); }
inline int __fastcall  GetByteCount(System::WideChar const *Chars, const int Chars_High){ return TEncoding::GetByteCount(Chars, Chars_High); }
inline int __fastcall  GetByteCount(const System::DynamicArray<System::WideChar> Chars){ return TEncoding::GetByteCount(Chars); }
inline int __fastcall  GetByteCount(System::WideChar const *Chars, const int Chars_High, int CharIndex, int CharCount){ return TEncoding::GetByteCount(Chars, Chars_High, CharIndex, CharCount); }
inline int __fastcall  GetByteCount(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount){ return TEncoding::GetByteCount(Chars, CharIndex, CharCount); }
inline int __fastcall  GetByteCount(const System::UnicodeString S){ return TEncoding::GetByteCount(S); }
inline int __fastcall  GetByteCount(const System::UnicodeString S, int CharIndex, int CharCount){ return TEncoding::GetByteCount(S, CharIndex, CharCount); }

Properties

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

Description

Returns the number of bytes generated by encoding Chars.

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

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