<?php include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc'; $TOC = array(); $TOC_DEPRECATED = array(); $PARENTS = array(); include_once dirname(__FILE__) ."/toc/class.dom-text.inc"; $setup = array ( 'home' => array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'dom-text.splittext.php', 1 => 'Dom\\Text::splitText', 2 => 'Breaks this node into two nodes at the specified offset', ), 'up' => array ( 0 => 'class.dom-text.php', 1 => 'Dom\\Text', ), 'prev' => array ( 0 => 'class.dom-text.php', 1 => 'Dom\\Text', ), 'next' => array ( 0 => 'class.dom-tokenlist.php', 1 => 'Dom\\TokenList', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/dom/text/splittext.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?> <div id="dom-text.splittext" class="refentry"> <div class="refnamediv"> <h1 class="refname">Dom\Text::splitText</h1> <p class="verinfo">(PHP 8 >= 8.4.0)</p><p class="refpurpose"><span class="refname">Dom\Text::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-dom-text.splittext-description"> <h3 class="title">说明</h3> <div class="methodsynopsis dc-description"> <span class="modifier">public</span> <span class="methodname"><strong>Dom\Text::splitText</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$offset</code></span>): <span class="type"><a href="class.dom-text.php" class="type Dom\Text">Dom\Text</a></span></div> <p class="para rdfs-comment"> Breaks this node into two nodes at the specified <code class="parameter">offset</code>, keeping both in the tree as siblings. </p> </div> <div class="refsect1 parameters" id="refsect1-dom-text.splittext-parameters"> <h3 class="title">参数</h3> <p class="para"> <dl> <dt><code class="parameter">offset</code></dt> <dd> <p class="para"> The offset at which to split, starting from 0. </p> </dd> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-dom-text.splittext-returnvalues"> <h3 class="title">返回值</h3> <p class="para"> The new node of the same type, which contains all the content at and after the <code class="parameter">offset</code>. </p> </div> </div><?php manual_footer($setup); ?>