|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.modeshape.jdbc.util.StringUtil
public class StringUtil
Utilities for string processing and manipulation.
Field Summary | |
---|---|
static String[] |
EMPTY_STRING_ARRAY
|
Method Summary | |
---|---|
static String |
createString(char charToRepeat,
int numberOfRepeats)
Create a new string containing the specified character repeated a specific number of times. |
static String |
createString(String pattern,
Object... parameters)
Create a string by substituting the parameters into all key occurrences in the supplied format. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] EMPTY_STRING_ARRAY
Method Detail |
---|
public static String createString(String pattern, Object... parameters)
{n}
, where n
is an integer starting at 1. Therefore, the first
parameter replaces all occurrences of "{1}", the second parameter replaces all occurrences of "{2}", etc.
If any parameter is null, the corresponding key is replaced with the string "null". Therefore, consider using an empty string when keys are to be removed altogether.
If there are no parameters, this method does nothing and returns the supplied pattern as is.
pattern
- the patternparameters
- the parameters used to replace keys
public static String createString(char charToRepeat, int numberOfRepeats)
charToRepeat
- the character to repeatnumberOfRepeats
- the number of times the character is to repeat in the result; must be greater than 0
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |