首字母大写

2022-05-05  本文已影响0人  YoungEvita
let name = 'abc'
let reg = /(^.?)/
name.replace(reg, v => `${v}`.toUpperCase())  // Abc
上一篇 下一篇

猜你喜欢

热点阅读