DocumentRange
data class DocumentRange(val start: DocumentProvider.Position, val end: DocumentProvider.Position)(source)
Represents a range within a document, defined by a start and end position.
A DocumentRange
encapsulates two Position
objects, representing the beginning and end of the range, respectively. These positions are zero-based and valid for navigating and selecting content within a textual document.
This class provides utilities for working with document ranges, including calculating the number of lines covered by the range, determining if the range spans multiple lines, and extracting a substring from a given text based on the range.