pokemon-rogue-battle
    Preparing search index...

    Function truncateString

    • Truncate a string to a specified maximum length and add an ellipsis if it exceeds that length.

      Parameters

      • str: string

        The string to be truncated.

      • maxLength: number = 10

        The maximum length of the truncated string, defaults to 10.

      Returns string

      The truncated string with an ellipsis if it was longer than maxLength.