truncate
Truncate a string to a maximum length, appending a suffix (default "...").
string(required): the string to truncatemaxLength(required): maximum total length (including suffix)suffix(optional): suffix to append (default"...")
utlx
truncate("Hello World, this is a long string", 15)
// "Hello World,..."
truncate("Hello World", 20) // "Hello World" (no truncation needed)