【发布时间】:2018-07-18 14:04:15
【问题描述】:
有人可以帮助我吗?我有一个字符串:
This is example. This is example. This is example. This is example. This is example. This is example. This is example. This is example. This is example.
我想删掉其中的 35 个字符,其余的字符串移到最后一行。之后,我想在第二行剪切 35 个字符的字符串,其余的字符串移到第三行。之后,我想在第三行剪切 35 个字符的字符串并将其余字符串移动到第四行。它应该是这样的:
This is example. This is example. T
his is example. This is example. Th
is is example. This is example. Thi
s is example. This is example. This
is example.
我试图用 substring 函数做一些事情,但我不知道如何向下移动我的字符串的其余部分。
【问题讨论】:
-
您需要将字符串拆分为更多记录还是需要通过换行来编辑字符串?
-
我只想通过添加换行符来编辑字符串。