Interface: TextLine
libs/common/types/TextLine.TextLine
Represents 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.
Implemented by
Properties
firstNonWhitespaceCharacterIndex
• Readonly firstNonWhitespaceCharacterIndex: number
The 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.
Defined in
libs/common/types/TextLine.ts:34
isEmptyOrWhitespace
• Readonly isEmptyOrWhitespace: boolean
Whether this line is whitespace only, shorthand for TextLine.firstNonWhitespaceCharacterIndex === TextLine.text.length.
Defined in
libs/common/types/TextLine.ts:46
lastNonWhitespaceCharacterIndex
• Readonly lastNonWhitespaceCharacterIndex: number
The offset of the last character which is not a whitespace character as defined
by /\s/. Note that if a line is all whitespace 0 is returned.
Defined in
libs/common/types/TextLine.ts:40
lineNumber
• Readonly lineNumber: number
The zero-based line number.
Defined in
libs/common/types/TextLine.ts:13
range
• Readonly range: Range
The range this line covers without the line separator characters.
Defined in
libs/common/types/TextLine.ts:23
rangeIncludingLineBreak
• Readonly rangeIncludingLineBreak: Range
The range this line covers with the line separator characters.
Defined in
libs/common/types/TextLine.ts:28
text
• Readonly text: string
The text of this line without the line separator characters.
Defined in
libs/common/types/TextLine.ts:18