MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / get_width

Function get_width

seleniumbase/translate/translator.py:93–100  ·  view source on GitHub ↗
(line)

Source from the content-addressed store, hash-verified

91
92
93def get_width(line):
94 # Return the true width of the line. Not the same as line length.
95 # Chinese/Japanese/Korean characters take up double width visually.
96 line_length = len(line)
97 for char in line:
98 if is_cjk(char):
99 line_length += 1
100 return line_length
101
102
103def process_test_file(code_lines, new_lang):

Callers 1

mainFunction · 0.70

Calls 1

is_cjkFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…