const getStr = (str, startIndex, endIndex, code) => {
let sliceStr = str.slice(startIndex, endIndex)
let replaceStr = ''
let len = sliceStr.length
let i = -1
while(++i < len) {
replaceStr += code
}
return str.replace(sliceStr, replaceStr)
}
网友评论