|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.xel.fn.StringFns
public class StringFns
Functions to manipulate strings in EL.
| Constructor Summary | |
|---|---|
StringFns()
|
|
| Method Summary | |
|---|---|
static String |
cat(String s1,
String s2)
Catenates two strings. |
static String |
cat3(String s1,
String s2,
String s3)
Catenates three strings. |
static String |
cat4(String s1,
String s2,
String s3,
String s4)
Catenates four strings. |
static String |
cat5(String s1,
String s2,
String s3,
String s4,
String s5)
Catenates four strings. |
static String |
eatQuot(String s)
Eliminates single and double quotations to avoid JavaScript injection. |
static boolean |
endsWith(String s1,
String s2)
Tests if this string ends with the specified suffix. |
static String |
join(Object[] ss,
String separator)
Joins an array of string. |
static String |
replace(String src,
String from,
String to)
Replaces all occurrances of 'from' in 'src' with 'to' |
static String[] |
split(String s,
String separator)
Splits a string. |
static boolean |
startsWith(String s1,
String s2)
Tests if this string starts with the specified prefix. |
static String |
substring(String s,
int from,
int to)
Returns a new string that is a substring of this string. |
static String |
toLowerCase(String s)
Converts all of the characters in this String to upper case using the rules of the current Locale. |
static String |
toUpperCase(String s)
Converts all of the characters in this String to upper case using the rules of the current Locale. |
static String |
trim(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 String cat(String s1,
String s2)
public static String cat3(String s1,
String s2,
String s3)
public static String cat4(String s1,
String s2,
String s3,
String s4)
public static String cat5(String s1,
String s2,
String s3,
String s4,
String s5)
public static String toLowerCase(String s)
Locales.getCurrent()public static String toUpperCase(String s)
Locales.getCurrent()public static String trim(String s)
public static String[] split(String s,
String separator)
public static String join(Object[] ss,
String separator)
public static boolean startsWith(String s1,
String s2)
public static boolean endsWith(String s1,
String s2)
public static String substring(String s,
int from,
int to)
public static String replace(String src,
String from,
String to)
public static String eatQuot(String s)
It is used to avoid JavaScript injection.
For exmple, 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 | |||||||||