1 2
This is a simple, no-brainer subroutine to truncate a string and add an optional cutoff marker (defaults to ``...'').