Search Docs
toTitleCase
将 str 转换为标题大小写,即每个单词的首字母大写。
str
import { toTitleCase } from 'funtool/string' toTitleCase('hello_world'); // ✅ 'Hello World' toTitleCase('hello-world'); // ✅ 'Hello World' toTitleCase('user_id'); // ✅ 'User Id'
function toTitleCase(str: string): string
string