array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'dom-characterdata.insertdata.php', 1 => 'Dom\\CharacterData::insertData', 2 => 'Insert a string at the specified UTF-8 codepoint offset', ), 'up' => array ( 0 => 'class.dom-characterdata.php', 1 => 'Dom\\CharacterData', ), 'prev' => array ( 0 => 'dom-characterdata.deletedata.php', 1 => 'Dom\\CharacterData::deleteData', ), 'next' => array ( 0 => 'dom-characterdata.remove.php', 1 => 'Dom\\CharacterData::remove', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/dom/dom/characterdata/insertdata.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>

Dom\CharacterData::insertData

(PHP 8 >= 8.4.0)

Dom\CharacterData::insertData Insert a string at the specified UTF-8 codepoint offset

Beschreibung

public Dom\CharacterData::insertData(int $offset, string $data): void

Inserts string data at position offset.

Parameter-Liste

offset

The character offset at which to insert.

data

The string to insert.

Rückgabewerte

Gibt bei Erfolg true zurück. Bei einem Fehler wird false zurückgegeben.

Fehler/Exceptions

DOM_INDEX_SIZE_ERR

Raised if offset is negative or greater than the number of UTF-8 codepoints in data.

Siehe auch