Package com.day.text
Class StringAbbreviator
- java.lang.Object
-
- com.day.text.StringAbbreviator
-
public class StringAbbreviator extends Object
String abbreviator that uses a macosx-style ellipsis algorithm, where an ellipsis is added in the middle of a string instead of at the end.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_ELLIPSISstatic StringSPACE
-
Constructor Summary
Constructors Constructor Description StringAbbreviator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringabbreviate(String str, int maxLength)Abbreviate str if needed, so that its number of characters is <= maxCharsStringgetEllipsis()voidsetEllipsis(String s)Set our ellipsis string, to the default if s is null
-
-
-
Field Detail
-
SPACE
public static final String SPACE
- See Also:
- Constant Field Values
-
DEFAULT_ELLIPSIS
public static final String DEFAULT_ELLIPSIS
- See Also:
- Constant Field Values
-
-