utils.text_helpers ================== .. py:module:: utils.text_helpers .. autoapi-nested-parse:: Truncation and safe excerpt rendering. Functions --------- .. autoapisummary:: utils.text_helpers.truncate Module Contents --------------- .. py:function:: truncate(text, max_len = 600, suffix = '…') Truncate ``text`` to ``max_len`` characters, appending ``suffix`` if cut. @ In, text, str, the text to truncate (falsy input returns "") @ In, max_len, int, maximum length of the returned string including suffix @ In, suffix, str, appended when the text is truncated @ Out, out, str, the (possibly truncated) string