Maybe just add a line to return the string when its length is shorter than the desired length. Otherwise, with a string like "this is a very long sentence", you get "this is a very long ..." instead of "this is a very long sentence".
Thanks and cheers :)
Re^2: In search of a better way to trim string
Replies are listed 'Best First'.