Javascript - How to trucate string and add three dots at end

前端 未结 0 984
南旧
南旧 2021-01-14 09:47

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

相关标签:
回答
  • 消灭零回复
提交回复
热议问题