Search Docs
toUpperAt
将 input 字符串中指定 index 位置的字符转换为大写。
input
index
import { toUpperAt } from 'funtool/string' toUpperAt('hello', 0) // ✅ 'Hello' toUpperAt('foo-bar', 'b') // ✅ 'foo-Bar'
function toUpperAt(input: string, target: string | number): string
string
target
string | number