MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / ranges

Function ranges

scripts/gen-pdf-unicode.py:20–32  ·  view source on GitHub ↗
(pred)

Source from the content-addressed store, hash-verified

18
19
20def ranges(pred):
21 out = []
22 start = None
23 for c in range(MAXCP):
24 ok = not is_surrogate(c) and pred(chr(c))
25 if ok and start is None:
26 start = c
27 elif not ok and start is not None:
28 out.append((start, c - 1))
29 start = None
30 if start is not None:
31 out.append((start, MAXCP - 1))
32 return out
33
34
35def emit_ranges(f, name, rs):

Callers 1

mainFunction · 0.85

Calls 2

rangeFunction · 0.85
is_surrogateFunction · 0.85

Tested by

no test coverage detected