System.WideStrUtils.UTF8CharLength

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

Delphi

function UTF8CharLength(Lead: AnsiChar): Integer; inline;

C++

extern DELPHI_PACKAGE int __fastcall UTF8CharLength(char Lead);

プロパティ

種類 可視性 ソース ユニット
function public
System.WideStrUtils.pas
System.WideStrUtils.hpp
System.WideStrUtils System.WideStrUtils

説明

UTF-8 の第 1 バイトに続く、バイト数を返します。

UTF-8 の第 1 バイトに続く、バイト数(第 1 バイトも含む)を判定するために UTF8CharLength を呼び出します。

UTF-8 では、それぞれの第 1 バイト文字に、不定数の他のバイト文字が続きます。UTF-8 でのこのような文字の組み合わせは、単一の Unicode 文字をエンコードするために使用されます。

メモ:  UTF8CharLength は、対象の文字が UTF-8 の有効な第 1 バイトではない場合に常に 1 を返します。

関連項目