Function capitalize

Converts the first character of string to upper case and the remaining to lower case.

3.0.0

capitalize('FRED')
// => 'Fred'
  • Parameters

    • Optionalstring: string

      The string to capitalize.

    Returns string

    Returns the capitalized string.