MCPcopy Index your code
hub / github.com/clips/pattern / linecol

Function linecol

pattern/web/json/decoder.py:58–64  ·  view source on GitHub ↗
(doc, pos)

Source from the content-addressed store, hash-verified

56
57
58def linecol(doc, pos):
59 lineno = doc.count('\n', 0, pos) + 1
60 if lineno == 1:
61 colno = pos
62 else:
63 colno = pos - doc.rindex('\n', 0, pos)
64 return lineno, colno
65
66
67def errmsg(msg, doc, pos, end=None):

Callers 2

__init__Method · 0.85
errmsgFunction · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…