|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.util.TextUtils
public final class TextUtils
Static utility functions for text handling.
Constructor Summary | |
---|---|
TextUtils()
|
Method Summary | |
---|---|
static java.lang.String |
escape(java.lang.String string)
Escapes all characters as needed in the given string. |
static java.lang.String |
parenthesize(java.lang.String s)
Adds parenthesizes to the string. |
static java.lang.String |
quote(java.lang.String string)
Surrounds the given string with double quotes ("). |
static java.lang.String |
replaceStrings(java.lang.String string,
java.lang.Object... objects)
Returns a string generated from a pattern string ,
where for all n, all occurrences of %n and %nn
are replaced by n-th argument in the objects list. |
static java.lang.String[] |
split(java.lang.String string,
char c)
Splits the given string into its parts that are separated by the character c . |
static java.lang.String |
unescape(java.lang.String string)
Unescapes all escaped characters in the given string. |
static java.lang.String |
unparenthesize(java.lang.String s)
Strips any paired parentheses from around the string. |
static java.lang.String |
unquote(java.lang.String string)
Removes the double quotes at the beginning and the end of the given string. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TextUtils()
Method Detail |
---|
public static java.lang.String replaceStrings(java.lang.String string, java.lang.Object... objects)
string
,
where for all n, all occurrences of %n and %nn
are replaced by n-th argument in the objects
list.
%n is replaced by the the string representation of the object,
%%n is equivalent to \"%n\".
public static java.lang.String escape(java.lang.String string)
public static java.lang.String unescape(java.lang.String string)
public static java.lang.String quote(java.lang.String string)
public static java.lang.String unquote(java.lang.String string)
public static java.lang.String[] split(java.lang.String string, char c)
c
.
public static java.lang.String parenthesize(java.lang.String s)
public static java.lang.String unparenthesize(java.lang.String s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |