public class StringUtil extends Object
| Constructor and Description |
|---|
StringUtil() |
public static String ellipsize(String input, int maxCharacters, int charactersAfterEllipsis) throws Exception
input - the input string that may be subjected to shorteningmaxCharacters - the maximum characters that are acceptable for the unshortended string. Must be at least 3, otherwise a string with ellipses is too long already.charactersAfterEllipsis - the characters after ellipsisException - the exceptionCopyright © 2016. All Rights Reserved.