capitalize

Capitalizes the first letter of the given string.
> capitalize(str: string): string
Parameters
  • str: The string to capitalize.
  • Returns: The string with the first letter capitalized.

Example

import { capitalize } from "@explita/daily-toolset";

capitalize("hello world"); // "Hello world"