Open 1596944197 opened 2 years ago
` let str = 'abcdefgHeight'
function search(str: T, t: T) { let index = 0 str.replace(new RegExp(t), function () { index = arguments[1] return '1' }) return !index ? null : index } `
` let str = 'abcdefgHeight'
function search(str: T, t: T) {
let index = 0
str.replace(new RegExp(t), function () {
index = arguments[1]
return '1'
})
return !index ? null : index
}
`