MCPcopy
hub / github.com/SirVer/ultisnips / _joined_len

Function _joined_len

pythonx/UltiSnips/change_provider.py:32–36  ·  view source on GitHub ↗

Length of '\\n'.join(lines) without materializing the string.

(lines)

Source from the content-addressed store, hash-verified

30
31
32def _joined_len(lines):
33 """Length of '\\n'.join(lines) without materializing the string."""
34 if not lines:
35 return 0
36 return sum(len(l) for l in lines) + len(lines) - 1
37
38
39def _is_pathological_diff_input(old_lines, new_lines):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected