|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.gargoylesoftware.base.util.StringUtil
A collection of utility methods dealing with strings
| Method Summary | |
static String |
expandTabs(String inputString,
int numberOfSpaces)
Expand each tab character into the specified numbers of spaces. |
static String |
join(byte[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
join(Collection collection,
String separator)
Create a string based on all the objects in the collection separated by the separator string. |
static String |
join(double[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
join(float[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
join(int[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
join(long[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
join(Object[] array,
String separator)
Create a string based on all the objects in the array separated by the separator string. |
static String |
nCopies(int copyCount,
char charToCopy)
Return a string containing the specified number of charToCopy |
static String |
replace(String sourceString,
String match,
String replace)
Perform text substitutions in the source string |
static String[] |
split(String line,
String separator)
Split the specified line into strings, spliting at each instance of separator. |
static String[] |
splitAtFirst(String line,
String separator)
Split the specified line into two strings, spliting at the first instance of separator. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static String expandTabs(String inputString,
int numberOfSpaces)
inputString - The string to be expanded.numberOfSpaces - The number of space characters to be used for each
substitution.
public static String nCopies(int copyCount,
char charToCopy)
copyCount - The number of times to copy the character.charToCopy - The character that will be copied.
public static String join(int[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(long[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(float[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(double[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(byte[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(Object[] array,
String separator)
array - The items that will be concatenated togetherseparator - The separator string.
public static String join(Collection collection,
String separator)
separator - The separator string.collection - The collection containing the objects to join
public static String[] splitAtFirst(String line,
String separator)
line - The line to be split.separator - The separator that will be used to split the string.
public static String[] split(String line,
String separator)
line - The line to be split.separator - The separator that will be used to split the string.
public static String replace(String sourceString,
String match,
String replace)
sourceString - The original stringmatch - The string to replacereplace - The new content to replace with
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||