Skip to content

TEncoding.GetMaxCharCount

Return the maximum number of characters that can be represented in a number of bytes

Declaration

Source position: sysencodingh.inc line 87

public 
  function GetMaxCharCount(ByteCount: Integer) : Integer;  Virtual
                          ;  Abstract;

Description

GetMaxCharCount returns the theoretical maximum number of characters that can be represented in a buffer of length ByteCount in the given encoding. Note that the actual number of characters that can be represented may well be much less and depends on the encoding and the actual characters.

This is an abstract method, implemented by descendents of TEncoding.

See also

Name Description
TEncoding.GetMaxByteCount Returns the maximum number of bytes needed to represent a string