StringTruncate extension

String extension to truncate a string to a given length.

on

Methods

truncate(int length) String

Available on String, provided by the StringTruncate extension

Truncates the string to a given length, adding ellipsis if necessary.