How to split sentence every n characters by word

后端 未结 0 1202
醉梦人生
醉梦人生 2021-02-14 18:59

I am trying to make a function that will split a sentence every 40 characters but will only split it on a space and will not split the string in the middle of a word. Currently,

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