UNPKG

@sapphire/utilities

Version:
17 lines (15 loc) 448 B
/** * Transforms the first letter to a capital then adds all the rest after it * * This differs from {@link toTitleCase} in that it doesn't force lowercase on the rest of the string. * * @param str - Text to transform * @returns The input `str` as `Str` * * @example * ```ts * capitalizeFirstLetter('hello world') // 'Hello world' * ``` */ declare function capitalizeFirstLetter(str: string): string; export { capitalizeFirstLetter };