MCPcopy
hub / github.com/mitmproxy/mitmproxy / fixlen

Function fixlen

mitmproxy/tools/console/common.py:147–151  ·  view source on GitHub ↗
(s: str, maxlen: int)

Source from the content-addressed store, hash-verified

145
146
147def fixlen(s: str, maxlen: int) -> str:
148 if len(s) <= maxlen:
149 return s.ljust(maxlen)
150 else:
151 return s[0 : maxlen - len(SYMBOL_ELLIPSIS)] + SYMBOL_ELLIPSIS
152
153
154def fixlen_r(s: str, maxlen: int) -> str:

Callers 3

format_http_flow_tableFunction · 0.85
format_message_flowFunction · 0.85
format_dns_flowFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…