truncate( param1, param2 )

Description:

Truncate a string that exceeds a desired character length.

Input:

String to potentially truncate.

Parameters:

Length to truncate the input string to.

Optional suffix to append to the string if truncation occurred. This suffix will count against the total allowed length.

Return:

The truncated string, or the original string if no truncation was necessary.