How do you shorten a string in advanced pdf templates? We need to drop the last 4 digits of an hts code on a Country of origin document. For an example if the HTS Code is 8708.29.5160 we want to show it as 8708.29 because the last four numbers are country specific.