Improved and exported truncate-string