(PHP 8 >= 8.4.0)
Dom\Text::splitText — Breaks this node into two nodes at the specified offset
public Dom\Text::splitText(int $offset): Dom\Text
Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.
offsetThe offset at which to split, starting from 0.
The new node of the same type, which contains all the content at and after the offset.
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/dom-text.splittext.php