Add a truncate text helper.