CakeFest 2024: The Official CakePHP Conference

DOMCharacterData::substringData

(PHP 5, PHP 7, PHP 8)

DOMCharacterData::substringData ノードから指定した範囲のデータを抽出する

説明

public DOMCharacterData::substringData(int $offset, int $count): string|false

指定した部分文字列を返します。

パラメータ

offset

部分文字列の抽出開始位置のオフセット。

count

抽出する文字数。

戻り値

指定された部分文字列を返します。 offsetcount の和が文字列の長さをこえている場合、データの末尾までのすべての 16 ビット単位が返されます。

エラー / 例外

DOM_INDEX_SIZE_ERR

offset が負、あるいは 16 ビット単位の データ長より大きい場合、または count が 負の場合に発生します。

参考

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top