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

Function getX

tools/pythonauto/static/codemirrorepl/codemirrorepl.js:1754–1756  ·  view source on GitHub ↗
(len)

Source from the content-addressed store, hash-verified

1752 if (x <= 0) return 0;
1753 var lineObj = getLine(line), text = lineObj.text;
1754 function getX(len) {
1755 return measureLine(lineObj, len).left;
1756 }
1757 var from = 0, fromX = 0, to = text.length, toX;
1758 // Guess a suitable upper bound for our search.
1759 var estimated = Math.min(to, Math.ceil(x / charWidth()));

Callers 2

charFromXFunction · 0.70
coordsCharFunction · 0.70

Calls 1

measureLineFunction · 0.70

Tested by

no test coverage detected