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
| Name | Type | Description |
|---|---|---|
| value | string | The source text to be truncated. |
| arg | integer | The maximum number of characters allowed before truncation occurs. |
Returns
| Type | Description |
|---|---|
string | The truncated string ending with an ellipsis if the original length exceeded the limit, or the original string if the limit is invalid. |