@ascentbv/ts-common - v1.0.123
    Preparing search index...

    Class TextUtilAbstract

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Converts a string to Title Case. Each word will have its first letter capitalized and the rest in lowercase.

      Parameters

      • str: string

        The string to convert.

      Returns string

      The formatted title case string.

      TextUtil.toTitleCase("hello world") // "Hello World"
      
    • Converts a string to camelCase. Underscores and spaces are removed, and each word (except the first) is capitalized.

      Parameters

      • str: string

        The string to convert.

      Returns string

      The formatted camelCase string.

      TextUtil.toCamelCase("my_example_string") // "myExampleString"