Get truncated text ending with ellipsis if the text is longer than the specified length
The string to truncate
The length of the final string
An excerpt of the truncated text with ellipsis
getTruncatedContent('This is a long string', 10) // 'This is a...' Copy
getTruncatedContent('This is a long string', 10) // 'This is a...'
Get truncated text ending with ellipsis if the text is longer than the specified length