code: public static String truncate (String text, int length, String append)
      {
          return StringUtil.truncate(text, length, append);
      }
docs: Truncates the supplied text at the specified length, appending the
  specified "elipsis" indicator to the text if truncated.