MCPcopy Index your code
hub / github.com/python/cpython / stripcolor

Function stripcolor

Lib/_pyrepl/completing_reader.py:55–56  ·  view source on GitHub ↗
(s: str)

Source from the content-addressed store, hash-verified

53STRIPCOLOR_REGEX = re.compile(r"\x1B\[([0-9]{1,3}(;[0-9]{1,2})?)?[m|K]")
54
55def stripcolor(s: str) -> str:
56 return STRIPCOLOR_REGEX.sub('', s)
57
58
59def real_len(s: str) -> int:

Callers 6

real_lenFunction · 0.85
left_alignFunction · 0.85
doMethod · 0.85
doMethod · 0.85

Calls 1

subMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…