API:System.SysUtils.TUnicodeEncoding.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 TUnicodeEncoding

Description

Calculates the maximum number of bytes generated to encode the specified number of characters. {{#multireplace:System.SysUtils.TUnicodeEncoding.GetMaxByteCount|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:System.SysUtils.TEncoding.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.TEncoding.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.

TEncoding.GetMaxByteCount calculates the maximum bytes generated to encode CharCount number of characters.

CharCount must be a positive integer.

The Return Value is the calculated number of bytes.

See Also


Code Examples