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