• Returns a string shortened to a maximum length

    If the string is already less than the max length, return the string. Else return the string, shortened to max - 3 and append three dots ("...").

    Parameters

    • max: any

      the maximum length of the string to return

    • str: any

      the input string

    Returns any