|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.xel.fn.StringFns
public class StringFns
Functions to manipulate strings in EL.
Constructor Summary | |
---|---|
StringFns()
|
Method Summary | |
---|---|
static java.lang.String |
cat(java.lang.String s1,
java.lang.String s2)
Concatenates two strings. |
static java.lang.String |
cat3(java.lang.String s1,
java.lang.String s2,
java.lang.String s3)
Concatenates three strings. |
static java.lang.String |
cat4(java.lang.String s1,
java.lang.String s2,
java.lang.String s3,
java.lang.String s4)
Concatenates four strings. |
static java.lang.String |
cat5(java.lang.String s1,
java.lang.String s2,
java.lang.String s3,
java.lang.String s4,
java.lang.String s5)
Concatenates four strings. |
static java.lang.String |
eatQuot(java.lang.String s)
Eliminates single and double quotations to avoid JavaScript injection. |
static boolean |
endsWith(java.lang.String s1,
java.lang.String s2)
Tests if this string ends with the specified suffix. |
static java.lang.String |
join(java.lang.Object[] ss,
java.lang.String separator)
Joins an array of string. |
static java.lang.String |
replace(java.lang.String src,
java.lang.String from,
java.lang.String to)
Replaces all occurrences of 'from' in 'src' with 'to' |
static java.lang.String[] |
split(java.lang.String s,
java.lang.String separator)
Splits a string. |
static boolean |
startsWith(java.lang.String s1,
java.lang.String s2)
Tests if this string starts with the specified prefix. |
static java.lang.String |
substring(java.lang.String s,
int from,
int to)
Returns a new string that is a substring of this string. |
static java.lang.String |
toLowerCase(java.lang.String s)
Converts all of the characters in this String to upper case using the rules of the current Locale. |
static java.lang.String |
toUpperCase(java.lang.String s)
Converts all of the characters in this String to upper case using the rules of the current Locale. |
static java.lang.String |
trim(java.lang.String s)
Returns a copy of the string, with leading and trailing whitespace omitted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringFns()
Method Detail |
---|
public static java.lang.String cat(java.lang.String s1, java.lang.String s2)
public static java.lang.String cat3(java.lang.String s1, java.lang.String s2, java.lang.String s3)
public static java.lang.String cat4(java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4)
public static java.lang.String cat5(java.lang.String s1, java.lang.String s2, java.lang.String s3, java.lang.String s4, java.lang.String s5)
public static java.lang.String toLowerCase(java.lang.String s)
Locales.getCurrent()
public static java.lang.String toUpperCase(java.lang.String s)
Locales.getCurrent()
public static java.lang.String trim(java.lang.String s)
public static java.lang.String[] split(java.lang.String s, java.lang.String separator)
public static java.lang.String join(java.lang.Object[] ss, java.lang.String separator)
public static boolean startsWith(java.lang.String s1, java.lang.String s2)
public static boolean endsWith(java.lang.String s1, java.lang.String s2)
public static java.lang.String substring(java.lang.String s, int from, int to)
public static java.lang.String replace(java.lang.String src, java.lang.String from, java.lang.String to)
public static java.lang.String eatQuot(java.lang.String s)
It is used to avoid JavaScript injection.
For example, in DSP or JSP pages, the following codes is better
to escape with this method.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |