klyn.io.xml.dom.XMLCharacterData.substringData
method
public substringData(offset as Int, count as Int) as String throws DOMException:
Description

Reads up to count UTF-16 units, clipping at the end.

Parameters
ParameterDescription
offsetZero-based UTF-16 offset, including length.
countMaximum number of UTF-16 units to return.
Returns

Requested text, or an empty string at the end.

Throws
  • DOMException if the DOM operation violates document ownership, hierarchy, naming, index, or node-state constraints.
Example
tail = document.createTextNode("hello").substringData(1, 100)
assert tail == "ello"