string_truncate
This method returns a truncated (shortened) string if longer than the specified size.
Accepts 3 parameters:
String: the string text to be evaluated (required)
Length: an integer denoting the maximum size before truncating and modifying the string (required)
Ellipsis: a string to be appended to any string longer than the "length" parameter. Optional, if there is no value specified the string '...' is used.
Usage:
string_truncate('Hello World, how are we all today?',11,'.')
-> Hello World.
string_truncate('Hello World, how are we all today?',11)
-> Hello World...
string_truncate('Hello World, how are we all today?',50)
-> Hello World, how are we all today?
Based on John Burwell's string_truncate tag for Lasso 8.x.
http://tagswap.net/string_truncate