Dom\Text::splitText

Breaks this node into two nodes at the specified offset

Description

public Dom\Text Dom\Text::splitText(int $offset)

Breaks this node into two nodes at the specified offset, keeping both in the tree as siblings.

Parameters

offset

The offset at which to split, starting from 0.

Return Values

The new node of the same type, which contains all the content at and after the offset.