Docs@skmtc/core

Names

FUNCTION

capitalize

@skmtc/core 0.63.4

Capitalizes the first character of a string.

Signature

import { capitalize } from '@skmtc/core'

capitalize(str: string): string

Parameters

str, string required

The string to capitalize

Example
capitalize('hello world'); // 'Hello world'
capitalize('API'); // 'API'
capitalize(''); // ''

Returns

string

The string with the first character uppercased