JS: Splitting a long string into strings with char limit while avoiding splitting words

前端 未结 4 1882
情深已故
情深已故 2021-01-04 02:37

I am trying to take a large block of text and split it into multiple strings that are 148 characters each, while avoiding cutting off words.

I have this now, which

4条回答
  •  情书的邮戳
    2021-01-04 03:41

    Without thinking to much about it, I would do something like this, just not in pseudo code

    if string length > 148
        for i=148;i

提交回复
热议问题