@alextheman/utility - v5.10.1
    Preparing search index...

    Function toTitleCase

    • Converts a string to a human-readable Title Case string.

      Words are split on spaces, underscores, and hyphens. Every first letter of each word is capitalised except for words specified in options.preserveWords.

      The comparison for preserved words is case-insensitive, but the original casing provided in preserveWords is retained in the output.

      Parameters

      • input: string

        The string to convert.

      • Optionaloptions: ToTitleCaseOptions

        Additional options to apply.

      Returns string

      A new string, converted into Title Case.