splitText

fun splitText(offset: Int): Text(source)

Splits data at the given offset and returns the remainder as Text node.

MDN Reference