public class StringAbbreviator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_ELLIPSIS |
static java.lang.String |
SPACE |
Constructor and Description |
---|
StringAbbreviator() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
abbreviate(java.lang.String str,
int maxLength)
Abbreviate str if needed, so that its number of characters
is <= maxChars
|
java.lang.String |
getEllipsis() |
void |
setEllipsis(java.lang.String s)
Set our ellipsis string, to the default if s is null
|
public static final java.lang.String SPACE
public static final java.lang.String DEFAULT_ELLIPSIS
public java.lang.String abbreviate(java.lang.String str, int maxLength)
public void setEllipsis(java.lang.String s)
public java.lang.String getEllipsis()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"