Package com.day.text
Class StringAbbreviator
java.lang.Object
com.day.text.StringAbbreviator
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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabbreviate(String str, int maxLength) Abbreviate str if needed, so that its number of characters is invalid input: '<'= maxCharsvoidSet our ellipsis string, to the default if s is null
-
Field Details
-
SPACE
- See Also:
-
DEFAULT_ELLIPSIS
- See Also:
-
-
Constructor Details
-
StringAbbreviator
public StringAbbreviator()
-
-
Method Details
-
abbreviate
Abbreviate str if needed, so that its number of characters is invalid input: '<'= maxChars -
setEllipsis
Set our ellipsis string, to the default if s is null -
getEllipsis
-