MCPcopy Create free account
hub / github.com/deepnote/vscode-deepnote / getText

Method getText

src/test/datascience/mockDocument.ts:147–155  ·  view source on GitHub ↗
(range?: Range | undefined)

Source from the content-addressed store, hash-verified

145 return new Position(line, ch);
146 }
147 public getText(range?: Range | undefined): string {
148 if (!range) {
149 return this._contents;
150 } else {
151 const startOffset = this.convertToOffset(range.start);
152 const endOffset = this.convertToOffset(range.end);
153 return this._contents.substr(startOffset, endOffset - startOffset);
154 }
155 }
156 public getWordRangeAtPosition(position: Position, regexp?: RegExp | undefined): Range | undefined {
157 if (!regexp) {
158 // use default when custom-regexp isn't provided

Callers 15

getCommentForUnionsFunction · 0.80
visitFunction · 0.80
dumpCellMethod · 0.80
initializeExecuteMethod · 0.80
handleExecutionMethod · 0.80
revertCellContentMethod · 0.80
protectCellLanguagesMethod · 0.80
copyCellAtOffsetMethod · 0.80

Calls 1

convertToOffsetMethod · 0.95

Tested by 5

visitFunction · 0.64
verifyCellsFunction · 0.64
createCellWithOutputsFunction · 0.64