Function upperFirst

  • Converts the first character of string to upper case.

    Parameters

    • str: string = ""

      The string to convert.

    Returns string

    Returns the converted string.

    5.5.1

    camelCase, kebabCase, lowerCase, snakeCase, startCase, upperCase

    upperFirst('fred')
    // => 'Fred'

    upperFirst('FRED')
    // => 'FRED'