MCPcopy Index your code
hub / github.com/lutzroeder/netron / offset_for_line

Method offset_for_line

source/python.js:13542–13544  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

13540 }
13541 }
13542 offset_for_line(line) {
13543 return this._line_starting_offsets[line];
13544 }
13545 lineno_for_offset(offset) {
13546 const iter = this._line_starting_offsets.findIndex((value) => value > offset);
13547 return (iter === -1 ? this._line_starting_offsets.length : iter) - 1;

Callers 2

constructorMethod · 0.80
file_line_colMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected