public class JSTLFunctions extends Object
Constructor and Description |
---|
JSTLFunctions() |
Modifier and Type | Method and Description |
---|---|
static String |
byteFormat(long bytes)
A formatter for formatting byte sizes.
|
static String |
escapeHTMLTags(String string)
This method takes a string which may contain HTML tags (ie, <7;b>,
<table>, etc) and converts the '<' and '>' characters to
their HTML escape sequences.
|
static String |
replaceAll(String string,
String regex,
String replacement)
JSTL delegate for
String.replaceAll(String, String) . |
static String[] |
split(String string,
String regex)
JSTL delegate for
String.split(String) . |
static String |
urlDecode(String string)
Decodes a
application/x-www-form-urlencoded string using the UTF-8 encoding scheme. |
static String |
urlEncode(String string)
Translates a string into
application/x-www-form-urlencoded format using a specific encoding scheme. |
public static String replaceAll(String string, String regex, String replacement)
String.replaceAll(String, String)
. The first argument is the value on which the
replacement has to occur. The other arguments are passed to String.replaceAll(String, String)
directly.String.replaceAll(String, String)
public static String[] split(String string, String regex)
String.split(String)
. The first argument is the value on which the replacement has to
occur. The other argument is used as the argument for the invocation of String.split(String)
.String.split(String)
public static String byteFormat(long bytes)
ByteFormat
public static String urlEncode(String string)
application/x-www-form-urlencoded
format using a specific encoding scheme. This
method uses the UTF-8 encoding scheme to obtain the bytes for unsafe characters.URLEncoder
public static String urlDecode(String string)
application/x-www-form-urlencoded
string using the UTF-8 encoding scheme. The encoding is used
to determine what characters are represented by any consecutive sequences of the form "%xy
".URLDecoder
public static String escapeHTMLTags(String string)
StringUtils.escapeHTMLTags(String)
Copyright © 2003–2019 Ignite Realtime. All rights reserved.