TextLine
interfaceRepresents a line of text, such as a line of source code. TextLine objects are __immutable__. When a document changes, previously retrieved lines will not represent the latest state.
Import
import { TextLine } from '@modular/sdk';Members6
- firstNonWhitespaceCharacterIndex
numberThe offset of the first character which is not a whitespace character as defined by `/\s/`. **Note** that if a line is all whitespace the length of the line is returned.
- isEmptyOrWhitespace
booleanWhether this line is whitespace only, shorthand for TextLine.firstNonWhitespaceCharacterIndex === TextLine.text.length.
- lineNumber
numberThe zero-based line number.
- range
RangeThe range this line covers without the line separator characters.
- rangeIncludingLineBreak
RangeThe range this line covers with the line separator characters.
- text
stringThe text of this line without the line separator characters.