System.SysUtils.TEncoding.GetByteCount
Delphi
function GetByteCount(Chars: PChar; CharCount: Integer): Integer; overload; virtual; abstract;
function GetByteCount(const Chars: Char): Integer; overload; inline;
function GetByteCount(const Chars: array of Char): Integer; overload;
function GetByteCount(const Chars: TCharArray): Integer; overload; inline;
function GetByteCount(const Chars: array of Char; CharIndex, CharCount: Integer): Integer; overload;
function GetByteCount(const Chars: TCharArray; CharIndex, CharCount: Integer): Integer; overload;
function GetByteCount(const S: string): Integer; overload; inline;
function GetByteCount(const S: string; CharIndex, CharCount: Integer): Integer; overload; inline;
function GetByteCount(const S: string; CharIndex, CharCount: Integer; const StringBaseIndex: Integer): Integer; overload;
C++
virtual int __fastcall GetByteCount(System::WideChar * Chars, int CharCount) = 0 /* overload */;
int __fastcall GetByteCount(const System::WideChar Chars)/* overload */;
int __fastcall GetByteCount(const System::WideChar *Chars, const int Chars_High)/* overload */;
int __fastcall GetByteCount(const System::DynamicArray<System::WideChar> Chars)/* overload */;
int __fastcall GetByteCount(const System::WideChar *Chars, const int Chars_High, int CharIndex, int CharCount)/* overload */;
int __fastcall GetByteCount(const System::DynamicArray<System::WideChar> Chars, int CharIndex, int CharCount)/* overload */;
int __fastcall GetByteCount(const System::UnicodeString S)/* overload */;
int __fastcall GetByteCount(const System::UnicodeString S, int CharIndex, int CharCount)/* overload */;
int __fastcall GetByteCount(const System::UnicodeString S, int CharIndex, int CharCount, const int StringBaseIndex)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | TEncoding |
説明
System.SysUtils.TEncoding.GetByteCount は System.SysUtils.TEncoding.GetByteCount を継承しています。以下の内容はすべて System.SysUtils.TEncoding.GetByteCount を参照しています。
文字列または文字群のセットをエンコードすることで生成されたバイト数を返します。
メモ: 文字列内のバイト数は、指定された文字配列や文字列の文字数に、厳密に比例している必要はありません。
function GetByteCount(Chars: PChar; CharCount: Integer): Integer; overload; virtual; abstract;
- このオーバーロードは、このクラスの抽象メソッドです。実際の実装は、子孫クラスにゆだねられます。
function GetByteCount(const Chars: Char): Integer; overload;
- Chars 文字をエンコードして生成されたバイト数を返します。
- Chars: エンコードする UNICODE の 1 文字
function GetByteCount(const Chars: array of Char): Integer; overload;
function GetByteCount(const Chars: TCharArray): Integer; overload;
- Chars 配列パラメータをエンコードして生成されたバイト数を返します。
- Chars: エンコードする文字群のセットを格納する、文字の配列。
function GetByteCount(const Chars: array of Char; CharIndex, CharCount: Integer): Integer; overload;
function GetByteCount(const Chars: TCharArray; CharIndex, CharCount: Integer): Integer; overload;
- Chars 配列パラメータの CharIndex インデックスから、CharCount 分の文字をエンコードすることで生成されたバイト数を返します。
- Chars: エンコードする文字群のセットを格納する、文字の配列。
- CharIndex: Chars 配列でエンコードする最初の文字のインデックス。
- CharCount: エンコードする文字数を指定するパラメータ。
function GetByteCount(const S: string): Integer; overload;
- S 文字列パラメータをエンコードして生成されたバイト数を返します。
- S: エンコードする文字群のセットを格納する文字列。
function GetByteCount(const S: string; CharIndex, CharCount: Integer): Integer; overload;
- 文字列S の CharIndex インデックスから、CharCount 分の文字をエンコードすることで生成されたバイト数を返します。 CharIndex は、デスクトップ プラットフォーム(Windows、Mac OS X、Linux)上では、1 始まりのインデックス、モバイル プラットフォーム(iOS や Android)では 0 始まりのインデックスです。
- S: エンコードする文字群のセットを格納する文字列。
- CharIndex: エンコードする最初の文字のインデックス。デスクトップ プラットフォーム(Windows、Mac OS X、Linux)では、CharIndex は 1 から始まります。モバイル プラットフォーム(iOS や Android)では、CharIndex は 0 から始まります。
- CharCount: エンコードする文字数を指定するパラメータ。
function GetByteCount(const S: string; CharIndex, CharCount: Integer; const StringBaseIndex: Integer): Integer; overload;
- 文字列S の CharIndex インデックスから、CharCount 分の文字をエンコードすることで生成されたバイト数を返します。 StringBaseIndex は基準のインデックス番号で、 S 文字列では、
0
または1
の CharIndex となります。- S: エンコードする文字群のセットを格納する文字列。
- CharIndex: エンコードする最初の文字のインデックス。 StringBaseIndex で制御されるインデックスの基準。
- CharCount: エンコードする文字数を指定するパラメータ。
- StringBaseIndex: 文字列 s での CharIndex の基準インデックス番号。この値は 0 か 1 となります。その他の数値が指定された場合、EEncodingError 例外が発生します。
Return Value は、実際にエンコードされたバイト数、または、実際の TBytes バイト シーケンスのバイト数です。
関連項目