MCPcopy Index your code
hub / github.com/csev/py4e / getBetween

Function getBetween

tools/pythonauto/static/codemirrorepl/codemirror.js:6443–6453  ·  view source on GitHub ↗
(doc, start, end)

Source from the content-addressed store, hash-verified

6441 // Get the part of a document between two positions, as an array of
6442 // strings.
6443 function getBetween(doc, start, end) {
6444 var out = [], n = start.line;
6445 doc.iter(start.line, end.line + 1, function(line) {
6446 var text = line.text;
6447 if (n == end.line) text = text.slice(0, end.ch);
6448 if (n == start.line) text = text.slice(start.ch);
6449 out.push(text);
6450 ++n;
6451 });
6452 return out;
6453 }
6454 // Get the lines between from and to, as array of strings.
6455 function getLines(doc, from, to) {
6456 var out = [];

Callers 3

makeChangeSingleDocFunction · 0.70
codemirror.jsFile · 0.70
historyChangeFromChangeFunction · 0.70

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected