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 String
DEFAULT_ELLIPSIS
static String
SPACE
-
Constructor Summary
Constructors Constructor Description StringAbbreviator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
abbreviate(String str, int maxLength)
Abbreviate str if needed, so that its number of characters is <= maxCharsString
getEllipsis()
void
setEllipsis(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
-
-