MCPcopy Index your code
hub / github.com/RustPython/RustPython / stripcolor

Function stripcolor

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

Source from the content-addressed store, hash-verified

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

Callers 2

real_lenFunction · 0.85
left_alignFunction · 0.85

Calls 1

subMethod · 0.45

Tested by

no test coverage detected