System.StringElementSize
Delphi
function StringElementSize(const S: UnicodeString): Word; overload;
function StringElementSize(const S: _RawByteStr): Word; overload;
C++
extern DELPHI_PACKAGE Word __fastcall StringElementSize(const UnicodeString S)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.pas System.hpp |
System | System |
説明
文字列内の 1 つの文字を表すバイト数を返します。
StringElementSize を呼び出すと、現在の文字列内の 1 つの文字を表すために必要なバイト数を取得できます。Unicode 文字列に対して StringElementSize を呼び出すと、常に 2 が結果として返されます。