PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

DOMXPath> <DOMText
Last updated: Fri, 05 Sep 2008

view this page in

DOMText::splitText

(No version information available, might be only in CVS)

DOMText::splitText 指定したオフセットでノードを 2 つに分割する

説明

DOMText DOMText::splitText ( int $offset )

指定したオフセット offset でノードを 2 つに分割します。分割したノードのツリー内での位置関係は、兄弟となります。

分割した後は、このノードは offset 位置までの 内容を保持するようになります。元のノードが親ノードを保持している場合、 新しいノードは元のノードの兄弟として元のノードの次の位置に挿入されます。 offset がこのノードの長さに等しい場合は、 新しいノードにはデータが含まれません。

パラメータ

offset

分割する位置を示すオフセット。0 から始まります。

返り値

同じ型の新しいノードを返します。offset 以降の内容をデータとして保持します。



add a note add a note User Contributed Notes
DOMText::splitText
There are no user contributed notes for this page.

DOMXPath> <DOMText
Last updated: Fri, 05 Sep 2008
 
 
show source | credits | stats | sitemap | contact | advertising | mirror sites