Function capitalize

  • Namespace

    StringUtils

    Capitalize the first letter of a string.

    Parameters

    • str: string

      The input string.

    Returns string

    The string with the first letter capitalized.

    Example

    const originalString = "hello, world!";
    const capitalizedString = capitalizeFirstLetter(originalString);
    console.log(capitalizedString); // Output: "Hello, world!"

Generated using TypeDoc