HaruEncoder::getByteType
(PECL haru:0.0.1)
HaruEncoder::getByteType — テキスト内のバイトの型を取得する
説明
int HaruEncoder::getByteType
( string $text
, int $index
)
テキスト内のバイトの型を取得します。
パラメータ
- text
-
テキスト。
- index
-
テキスト内の位置。
返り値
テキスト内の指定した位置のバイトの型を返します。 結果は以下のいずれかの値となります。
- HaruEncoder::BYTE_TYPE_SINGLE - シングルバイト文字。
- HaruEncoder::BYTE_TYPE_LEAD - ダブルバイト文字の先頭バイト。
- HaruEncoder::BYTE_TYPE_TRAIL - ダブルバイト文字の後続バイト。
- HaruEncoder::BYTE_TYPE_UNKNOWN - エンコーダが無効、あるいはバイトの型の取得に失敗。
エラー / 例外
エラー時に HaruException をスローします。
HaruEncoder::getByteType
There are no user contributed notes for this page.
