MCPcopy
hub / github.com/treeverse/dvc / _visual_width

Function _visual_width

dvc/utils/__init__.py:206–209  ·  view source on GitHub ↗

Get the number of columns required to display a string

(line)

Source from the content-addressed store, hash-verified

204
205
206def _visual_width(line):
207 """Get the number of columns required to display a string"""
208
209 return len(re.sub(AnsiToWin32.ANSI_CSI_RE, "", line))
210
211
212def _visual_center(line, width):

Callers 2

boxifyFunction · 0.85
_visual_centerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected