Rope class
Methods
-
charAt(int position)
→ String
-
-
chunks()
→ Iterable<String>
-
-
concatImmutable(Rope other)
→ Rope
-
Creates a new Rope by concatenating another Rope (immutable)
-
copy()
→ Rope
-
Creates a deep copy of this Rope
-
delete(int start, int end)
→ void
-
Mutable delete - modifies this rope in place
For immutable version, use deleteImmutable
-
deleteImmutable(int start, int end)
→ Rope
-
Creates a new Rope with text deleted between start and end (immutable)
-
findLineEnd(int offset)
→ int
-
-
findLineStart(int offset)
→ int
-
-
getBiDiSegmentsForLine(int lineIndex)
→ List<BiDiSegment>
-
Get BiDi segments for a specific line
-
getBiDiSegmentsInRange(int start, int end)
→ List<BiDiSegment>
-
Get BiDi segments within a character range
-
getLineAtOffset(int charOffset)
→ int
-
-
getLineStartOffset(int lineIndex)
→ int
-
-
getLineText(int lineIndex)
→ String
-
-
getRtlSegments()
→ List<(int, int)>
-
Get only RTL segments (useful for rendering)
-
getText()
→ String
-
-
insert(int position, String text)
→ void
-
Mutable insert - modifies this rope in place
For immutable version, use insertImmutable
-
insertImmutable(int position, String text)
→ Rope
-
Creates a new Rope with text inserted at position (immutable)
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
splitImmutable(int position)
→ (Rope, Rope)
-
Splits this rope at position, returning two new Ropes (immutable)
-
substring(int start, [int? end])
→ String
-
-
toString()
→ String
-
A string representation of this object.
inherited
-
toStringWithBiDiControls()
→ String
-
Wrap text with appropriate BiDi control characters for rendering