首字母大写 2022-05-05 本文已影响0人 YoungEvita let name = 'abc' let reg = /(^.?)/ name.replace(reg, v => `${v}`.toUpperCase()) // Abc