[I] SourceFile
Extended by
Section titled “Extended by”Properties
Section titled “Properties”Methods
Section titled “Methods”getLineAndCharacterOfPosition()
Section titled “getLineAndCharacterOfPosition()”getLineAndCharacterOfPosition(position): LineAndCharacter;
Converts a one-dimensional position in the document (measured in UTF-16 code units) to line number and offset from line start.
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
position | number |
Returns
Section titled “Returns”getLineStarts()
Section titled “getLineStarts()”getLineStarts(): readonly number[];
Array of positions in the text where each line begins. There is one entry per line, in order of lines, and each entry represents the offset in UTF-16 code units from the start of the document to the beginning of the line.
Returns
Section titled “Returns”readonly number
[]