A notebook range represents an ordered pair of two cell indices. It is guaranteed that start is less than or equal to end.

Constructor

new(start:Int, end:Int)

Create a new notebook range. If start is not before or equal to end, the values will be swapped.

Parameters:

start

start index

end

end index.

Variables

read onlyend:Int

The exclusive end index of this range (zero-based).

read onlyisEmpty:Bool

true if start and end are equal.

read onlystart:Int

The zero-based start index of this range.

Methods

with(change:{start:Null<Int>, end:Null<Int>}):NotebookRange

Derive a new range for this range.

Parameters:

change

An object that describes a change to this range.

Returns:

A range that reflects the given change. Will return this range if the change is not changing anything.