Function title

  • Namespace

    StringUtils

    Convert a string to title case, capitalizing the first letter of each word.

    Parameters

    • str: string

      The input string.

    Returns string

    The string in title case.

    Example

    const originalString = "hello, world!";
    const titleCasedString = StringUtils.titleCase(originalString);
    console.log(titleCasedString); // Output: "Hello, World!"

Generated using TypeDoc