|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.handler.util.TextUtil
public class TextUtil
Various static String manipulation methods.
| Constructor Summary | |
|---|---|
TextUtil()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
appendRequestParameter(java.lang.String baseUrl,
java.lang.String key,
java.lang.String value,
java.lang.String encoding)
|
static java.lang.String[] |
extractTokens(java.lang.String source,
java.lang.String startDelimiter,
java.lang.String endDelimiter,
boolean ignoreCase)
Extracts all tokens from a source that are enclosed by the specified start and enddelimiter. |
static java.lang.String |
filter(java.lang.String source,
java.lang.String startDelimiter,
java.lang.String endDelimiter)
Filters the parts starting with the startDelimiter and ending with the endDelimiter
from a string. |
static java.lang.String |
join(java.lang.Object[] values,
java.lang.String delimiter)
Concatenates the elements of an array to a String. |
static java.lang.String |
replace(java.lang.String original,
java.lang.String token,
java.lang.String replacement)
|
static java.lang.String[] |
split(java.lang.String string,
char splitter)
Returns A array of the non-empty string tokens in the source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TextUtil()
| Method Detail |
|---|
public static java.lang.String[] extractTokens(java.lang.String source,
java.lang.String startDelimiter,
java.lang.String endDelimiter,
boolean ignoreCase)
$ values = "pom pom <L>Link</L> en <L>link2</l> tralala."; $ $%extractTokens(values, "<L>", "</L>", false)%$ $%extractTokens(values, "<L>", "</L>", true)%$ Output - [Link][Link, link2]
source - The source from which the tokens should be extactedstartDelimiter - The start delimiter for the requested tokensendDelimiter - The end delimiter for the requested tokensignoreCase - Indicates whether matching of delimiters should be case sensitive
public static java.lang.String filter(java.lang.String source,
java.lang.String startDelimiter,
java.lang.String endDelimiter)
startDelimiter and ending with the endDelimiter
from a string.
source - The original stringstartDelimiter - The start tag of the parts that should be filteredendDelimiter - The end tag of the parts that be filtered
public static java.lang.String[] split(java.lang.String string,
char splitter)
string - The source that should be splitted into tokenssplitter - The char that should be used as delimiter
public static java.lang.String join(java.lang.Object[] values,
java.lang.String delimiter)
Example: print(join(elements,"+")); Output - text1+text2+text3+text4
values - The values that should be joineddelimiter - The String that is placed between the elements
public static java.lang.String replace(java.lang.String original,
java.lang.String token,
java.lang.String replacement)
public static java.lang.String appendRequestParameter(java.lang.String baseUrl,
java.lang.String key,
java.lang.String value,
java.lang.String encoding)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||