Strings

Functions utils for strings

Methods

(static) capitalize(input) → {string}

Capitalizes the first letter of a string.

Parameters:
NameTypeDescription
inputstring

The string to capitalize.

Throws:
  • If the input is not a string.
Type
TypeError
Returns:
  • The capitalized string.
Type: 
string
Example
capitalize("hello"); // "Hello"
capitalize("world"); // "World"