System.SysUtils.TUnicodeEncoding.GetByteCount

提供: RAD Studio API Documentation
移動先: 案内検索

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); }

プロパティ

種類 可視性 ソース ユニット
function
class protected
public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils TUnicodeEncoding

説明

渡された文字をエンコードして生成されたバイト数を返します。

Chars をエンコードして生成されたバイト数を返します。文字列内のバイト数は、与えられた文字配列または文字列内の文字数と必ずしも完全に比例しません。UTF-16 でエンコードされた文字列内の 1 文字は 2 バイトです。

このメソッドで利用できるパラメータとその説明を以下の表に示します。



パラメータ 説明

Chars

カウント対象のバイトを含む文字配列または文字ポインタ。

CharCount

エンコードする文字数を指定します。



戻り値は、渡された Chars パラメータ内のバイト数です。

関連項目