Truncates string to length, breaking at word boundaries

  • Parameters

    • s: string

      String to truncate

    • l: number

      Maximum length

    • suffix: string = '...'

      String to append if truncated

    Returns string

    Truncated string