splitImmutable method

(Rope, Rope) splitImmutable(
  1. int position
)

Implementation

(Rope, Rope) splitImmutable(int position) {
  if (position < 0 || position > length) {
    throw RangeError('Invalid position: $position for length $length');
  }
  return (
    Rope._fromRoot(_root.range(0, position), _selection),
    Rope._fromRoot(_root.range(position, length), _selection),
  );
}