Add a parameter to ShortString shorten.

This is a patch to enable configuration of the length of the
resulting string in shorten.