//使用
this.insertStr('202005',4,'/')
====================
//方法:
//soure 原字符串
//start 位置
//newStr 要插入的字符串
insertStr(soure, start, newStr){
return soure.slice(0, start) + newStr + soure.slice(start);
},
====================
//结果
2020/05
//使用
this.insertStr('202005',4,'/')
====================
//方法:
//soure 原字符串
//start 位置
//newStr 要插入的字符串
insertStr(soure, start, newStr){
return soure.slice(0, start) + newStr + soure.slice(start);
},
====================
//结果
2020/05