MCPcopy
hub / github.com/django/django / trim_url

Method trim_url

django/utils/html.py:412–415  ·  view source on GitHub ↗
(self, x, *, limit)

Source from the content-addressed store, hash-verified

410 return word
411
412 def trim_url(self, x, *, limit):
413 if limit is None or len(x) <= limit:
414 return x
415 return "%s…" % x[: max(0, limit - 1)]
416
417 @cached_property
418 def wrapping_punctuation_openings(self):

Callers 1

handle_wordMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected