摘要: 方法1 使用正则 (如果是汉字,此正则,每五个字换行,如果是英文字符,每十个英文,换行) let arrX ="这是个测试字符串,这是个测试字符串" arrX = arrX.replace(/[^\x00-\xff]/g,"$&\x01").replace(/.{10}\x01?/g,"$&\n") 阅读全文
posted @ 2021-04-12 22:06 橙子不是orange 阅读(2313) 评论(0) 推荐(0) 编辑