API:System.SysUtils.TUTF8Encoding.GetMaxByteCount

From RAD Studio API Documentation

Delphi

function GetMaxByteCount(CharCount: Integer): Integer; override;

C++

virtual int __fastcall GetMaxByteCount(int CharCount);

Properties

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

Description

Calculates the maximum number of bytes generated to encode the specified number of characters. {{#multireplace:System.SysUtils.TUTF8Encoding.GetMaxByteCount|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.SysUtils.TUTF7Encoding.GetMaxByteCount|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:System.SysUtils.TUTF7Encoding.GetMaxByteCount|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.

Calculates the maximum number of bytes generated to encode the specified number of characters.

GetMaxByteCount calculates the maximum number of bytes generated to encode a CharCount number of characters. The following table lists the parameters expected by this method and their description.



Parameter Description

CharCount

A positive integer specifying the number of characters.



The return value is the calculated number of bytes.

See Also