@Test public void testEllipsize() { assertEquals("He...", StringUtils.ellipsize("Hello world", 5)); assertEquals("Hell>", StringUtils.ellipsize("Hello world", 5, ">")); }
public static String ellipsize(String text, int maxLength) { return ellipsize(text, maxLength, "..."); }
StringUtils { public static String ellipsize(String text, int maxLength) { return ellipsize(text, maxLength, "..."); } }
StringUtils { public static String ellipsize(String text, int maxLength) { return ellipsize(text, maxLength, "..."); }  }
StringUtils { public static String ellipsize(String text, int maxLength) { return ellipsize(text, maxLength, "..."); }  static String[] split(String string, char delimiter); static String encodeUrl(String stringToEncode); static String encodeUrlIso(String stringToEncode); static String decodeUrl(String stringToDecode); static String decodeUrlIso(String stringToDecode); static String md5(String stringToEncode); static String sha1(String stringToEncode); static String digest(String string, String digestAlgo, String encoding); static String hex(byte[] bytes); static byte[] parseHex(String hex); static int parseHexDigit(char c); static String resolveEntity(String entity); static String ellipsize(String text, int maxLength); static String ellipsize(String text, int maxLength, String end); static String[] splitLines(String text, boolean skipEmptyLines); static List<String> findLinesContaining(String text, String searchText); static String join(Iterable<?> iterable, String separator); static String join(int[] array, String separator); static String join(String[] array, String separator); }
StringUtils { public static String ellipsize(String text, int maxLength) { return ellipsize(text, maxLength, "..."); }  static String[] split(String string, char delimiter); static String encodeUrl(String stringToEncode); static String encodeUrlIso(String stringToEncode); static String decodeUrl(String stringToDecode); static String decodeUrlIso(String stringToDecode); static String md5(String stringToEncode); static String sha1(String stringToEncode); static String digest(String string, String digestAlgo, String encoding); static String hex(byte[] bytes); static byte[] parseHex(String hex); static int parseHexDigit(char c); static String resolveEntity(String entity); static String ellipsize(String text, int maxLength); static String ellipsize(String text, int maxLength, String end); static String[] splitLines(String text, boolean skipEmptyLines); static List<String> findLinesContaining(String text, String searchText); static String join(Iterable<?> iterable, String separator); static String join(int[] array, String separator); static String join(String[] array, String separator);  }