<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Breaks this node into two nodes at the specified offset</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="domtext.iswhitespaceinelementcontent.html">DOMText::isWhitespaceInElementContent</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domxpath.html">DOMXPath</a></div> <div class="up"><a href="class.domtext.html">DOMText</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="domtext.splittext" class="refentry"> <div class="refnamediv"> <h1 class="refname">DOMText::splitText</h1> <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">DOMText::splitText</span> — <span class="dc-title"> Breaks this node into two nodes at the specified offset </span></p> </div> <div class="refsect1 description" id="refsect1-domtext.splittext-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="type"><a href="class.domtext.html" class="type DOMText">DOMText</a></span> <span class="methodname"><strong>DOMText::splitText</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$offset</code></span> )</div> <p class="para rdfs-comment"> Breaks this node into two nodes at the specified <em><code class="parameter">offset</code></em>, keeping both in the tree as siblings. </p> <p class="para"> After being split, this node will contain all the content up to the <em><code class="parameter">offset</code></em>. If the original node had a parent node, the new node is inserted as the next sibling of the original node. When the <em><code class="parameter">offset</code></em> is equal to the length of this node, the new node has no data. </p> </div> <div class="refsect1 parameters" id="refsect1-domtext.splittext-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">offset</code></em></span> <dd> <p class="para"> The offset at which to split, starting from 0. </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-domtext.splittext-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> The new node of the same type, which contains all the content at and after the <em><code class="parameter">offset</code></em>. </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="domtext.iswhitespaceinelementcontent.html">DOMText::isWhitespaceInElementContent</a></div> <div class="next" style="text-align: right; float: right;"><a href="class.domxpath.html">DOMXPath</a></div> <div class="up"><a href="class.domtext.html">DOMText</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>