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

Method wlen

Lib/_pyrepl/reader.py:437–438  ·  view source on GitHub ↗
(s: str)

Source from the content-addressed store, hash-verified

435 # wlen from utils already excludes ANSI_ESCAPE_SEQUENCE chars,
436 # which breaks the logic below so we redefine it here.
437 def wlen(s: str) -> int:
438 return sum(str_width(i) for i in s)
439
440 out_prompt = ""
441 l = wlen(prompt)

Callers

nothing calls this directly

Calls 2

str_widthFunction · 0.85
sumFunction · 0.50

Tested by

no test coverage detected