I have a js string and I wanted to truncate it after 43 char and add three dots (...) at end. Three dots can be em dash.
Now the problem is if there was a whitespace