public final class Strings
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
abbreviate(java.lang.String text,
int size)
Abbreviate the given text on the given size limit with ellipsis.
|
static java.lang.String |
concat(java.lang.Object left,
java.lang.Object right)
Concatenate the string representation of the given objects.
|
static java.lang.String |
encodeURL(java.lang.String string)
URL-encode the given string using UTF-8.
|
static java.lang.String |
escapeJS(java.lang.String string)
Escapes the given string according the JavaScript code rules.
|
static java.lang.String |
prettyURL(java.lang.String string)
URL-prettify the given string.
|
public static java.lang.String abbreviate(java.lang.String text,
int size)
text - The text to be abbreviated.size - The size limit of the text.public static java.lang.String concat(java.lang.Object left,
java.lang.Object right)
null, otherwise the new EL 2.2
#{bean.string1.concat(bean.string2)} can just be used.left - The left hand.right - The right hand.public static java.lang.String prettyURL(java.lang.String string)
string - The string to be prettified.public static java.lang.String encodeURL(java.lang.String string)
<f:param>.string - The string to be URL-encoded.java.lang.UnsupportedOperationException - When this platform does not support UTF-8.public static java.lang.String escapeJS(java.lang.String string)
string - The string to be escaped according the JavaScript code rules.