Applying Srihari Reddy's patch from LANG-405, based on Dave Meikle's original patch. This adds a truncateMiddle method to StringUtils.