RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TMBCSEncoding.GetByteCount Method

Returns the number of bytes generated by encoding Chars.

Pascal
function GetByteCount(Chars: PChar; CharCount: Integer): Integer; override; overload;
C++
virtual __fastcall int GetByteCount(const char * Chars, int CharCount);

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!