字符串设置首字母大写

function(str: string): string {
  return str.slice(0,1).toUpperCase() + str.slice(1);
}

 

posted @ 2023-03-20 17:06  冰凝^  阅读(42)  评论(0)    收藏  举报