UCTruncate (open)
Truncate a text if it's too long, adding an ellipsis ('…') if truncated. Whitespace between the text and ellipsis will be removed.
Syntax
// Core function, no LOADLIB necessary
STRING FUNCTION UCTruncate(STRING text, INTEGER maxlen)Parameters
STRING textText to check and truncate if needed
INTEGER maxlenMaximum text length (in codepoints)
Return value
STRINGThe text, truncated if needed, never longer than 'maxlen' in codepoints. If only whitespace remains after truncating, an empty string will be returned