|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jpu.patterns.common.JPUStringUtils
Method Summary | |
static java.util.List |
split(java.lang.String str,
java.lang.String delim)
Equivalent to split(str, delim, true) . |
static java.util.List |
split(java.lang.String str,
java.lang.String delim,
boolean trim)
This method is like org.apache.commons.lang.StringUtils.split() , except for two differences:
1) Its return value is List instead of String[] , and 2) it gives you the option of
trimming each component before it is added to the list. |
static java.util.List |
splitN(java.lang.String str,
java.lang.String delim,
int n,
boolean trim)
Just like split(String,String,boolean) , except that only the leftmost
"n-1 " delimeted parts are split; the rest are left contiguous. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.util.List split(java.lang.String str, java.lang.String delim)
split(str, delim, true)
.
public static java.util.List splitN(java.lang.String str, java.lang.String delim, int n, boolean trim)
split(String,String,boolean)
, except that only the leftmost
"n-1
" delimeted parts are split; the rest are left contiguous.
str
- The string.delim
- The delimeter.n
- The maximum number of parts that will appear in the resulting List
. If less than 2,
the resulting list will contain exactly one element set to the entire original string "str
".trim
- Indicates whether to trim each part before adding it to the resulting List
.public static java.util.List split(java.lang.String str, java.lang.String delim, boolean trim)
org.apache.commons.lang.StringUtils.split()
, except for two differences:
1) Its return value is List
instead of String[]
, and 2) it gives you the option of
trimming each component before it is added to the list.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |