peekLength method

int peekLength()

Returns length of next operation without consuming it.

Returns maxLength if there is no more operations left to iterate.

Implementation

int peekLength() {
  if (_index < delta.length) {
    final operation = delta.operations[_index];
    return operation.length! - _offset;
  }
  return maxLength;
}