code: function (str) {
    const args = arguments
    let flag = true
    let i = 1
  
    str = str.replace(/%s/g, () => {
      const arg = args[i++]
  
      if (typeof arg === 'undefined') {
        flag = false
        return ''
      }
      return arg
    })
    return flag ? str : ''
  }
docs: it only does '%s', and return '' when arguments are undefined