【发布时间】:2018-05-10 06:49:37
【问题描述】:
例如
let paragraph = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
我需要在每 N 个单词之后添加substring seperator "$$$$"
变成这样三个字
"Lorem Ipsum is $$$$ simply dummy text $$$$ of the printing $$$$ ....etc"
【问题讨论】:
-
我检查它并尝试为单词做
-
你的?很好,我尝试了不同的方式,可能对你有帮助
-
是的,我会在解决时继续工作,我会发布完整的解决方案
-
我完成了任务,我应该上传我的答案