System.SysUtils.ByteLength
Delphi
function ByteLength(const S: UnicodeString): Integer;
function ByteLength(const S: RawByteString): Integer;
C++
extern DELPHI_PACKAGE int __fastcall ByteLength(const System::UnicodeString S)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
説明
与えられた文字列の長さをバイト数で返します。
文字列のサイズをバイト数で取得するには、ByteLength を呼び出します。ByteLength は、その文字列内の文字数に 1 文字当たりのサイズを掛けることによって、文字列のサイズを計算します。たとえば、文字列 "John" の場合、ByteLength は 8 を返します。