cutAnsiByCells function

String cutAnsiByCells(
  1. String s,
  2. int start,
  3. int end
)

Cuts an ANSI string by visible cell indices, preserving any active SGR/OSC 8 state at the start boundary.

This is useful for viewport-style horizontal scrolling and truncation.

Implementation

String cutAnsiByCells(String s, int start, int end) =>
    _cutAnsiByCells(s, start, end);