Skip to main content

truncatechars

Truncate a string after arg number of characters.

def truncatechars(
value: string,
arg: integer
) - > string

Truncate a string after arg number of characters.

Parameters

NameTypeDescription
valuestringThe source text to be truncated.
argintegerThe maximum number of characters allowed before truncation occurs.

Returns

TypeDescription
stringThe truncated string ending with an ellipsis if the original length exceeded the limit, or the original string if the limit is invalid.