找规律,用split即可

const _searchStrIndexOf = (str, target) => {
  // 补全代码
  const arr = str.split(`${target}`)
  return arr.length - 1
}