AbstractAbstract ReadonlychildrenIf this is a branch node, children will hold the Text
objects that it is made up of. For leaf nodes, this holds null.
Abstract ReadonlylengthThe length of the string.
Abstract ReadonlylinesThe number of lines in the string (always >= 1).
StaticemptyThe empty document.
Iterate over the text. When dir is -1, iteration happens
from end to start. This will return lines and the breaks between
them as separate strings.
Optionaldir: -1 | 1Return a cursor that iterates over the given range of lines, without returning the line breaks between, and yielding empty strings for empty lines.
When from and to are given, they should be 1-based line numbers.
Optionalfrom: numberOptionalto: numberIterate over a range of the text. When from > to, the
iterator will run in reverse.
Optionalto: numberAbstractsliceRetrieve a part of the document as a string
Optionalto: numberOptionallineSep: stringConvert the document to an array of lines (which can be
deserialized again via Text.of).
Return the document as a string, using newline characters to separate lines.
Staticof
The data structure for documents.
Nonabstract