System.SysUtils.TMBCSEncoding.GetByteCount
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(const System::WideChar *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(const System::WideChar *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); }
inline int __fastcall GetByteCount(const System::UnicodeString S, int CharIndex, int CharCount, const int StringBaseIndex){ return TEncoding::GetByteCount(S, CharIndex, CharCount, StringBaseIndex); }
Eigenschaften
Typ | Sichtbarkeit | Quelle | Unit | Übergeordnet |
---|---|---|---|---|
function | class protected public |
System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TMBCSEncoding |
Beschreibung
Gibt die Anzahl der beim Codieren der übergebenen Zeichen erzeugten Bytes zurück.
Gibt die Anzahl der beim Codieren von Chars erzeugten Bytes zurück. Beachten Sie bitte, dass die Anzahl der Bytes in einem String nicht notwendigerweise genau proportional zu der Anzahl der Zeichen in einem gegebenen Zeichen-Array oder String sein muss. Ein Zeichen in einem in MBCS (Multi-Byte Character Set) codierten String kann sich aus mehreren Bytes zusammensetzen.
Die folgende Tabelle enthält die von dieser Methode erwarteten Parameter und deren Beschreibung.
Parameter | Beschreibung |
---|---|
Chars |
Ein Zeichen-Array oder ein Zeichenzeiger, der die zu zählenden Bytes enthält. |
CharCount |
Gibt die Anzahl der zu codierenden Zeichen an. |
Der Rückgabewert ist die Anzahl der Bytes in dem übergebenen Parameter Chars.