我有一个字符串:
String testString= "For the time being, programming is a consumer job, assembly line coding is the norm, and what little exciting stuff is being performed is not going to make it compared to the mass-marketed cräp sold by those who think they can surf on the previous half-century's worth of inventions forever"
像这样:暂时,编程……
在这个字符串中的每20个字符之后,我想要插入一个换行符\n,以在Android的TextView中显示。
str.replaceAll(".{20}", "$0\n")
- Boann