Shorten string

17 Ⅴ 2010

This is a small function that shortens a string.
It looks if the string is longer than a preset length, and if so cuts the text there.
Then it removes the last word from the string (so your string ends neatly at a space), and adds three dots.