edu.umd.cs.findbugs.util
public class Strings extends Object
Method Summary | |
---|---|
static String | replace(String source, String find, String repl) This is intended to be semantically equivalent to source.replace(find, repl)
but also compatible with JDK 1.4. |
static String | toString(Object[] a) This is intended to be equivalent to Arrays.toString(a)
but also compatible with JDK 1.4.
|
static String | trimComma(String s)
Trim trailing comma from given string.
|
source.replace(find, repl)
but also compatible with JDK 1.4.Parameters: source The String on which to operate find The literal substring to be replaced repl The literal replacement substring
Returns: The resultant String after substitution
Throws: NullPointerException if any of the arguments are null IllegalArgumentException if find
has zero length
See Also: java.lang.String#replace(CharSequence target, CharSequence replacement)
Arrays.toString(a)
but also compatible with JDK 1.4.
This concatenates the results of calling String.valueOf() on each element
of the array, so this won't work well for multi-dimensional arrays.See Also: java.lang.String#valueOf(Object) java.util.Arrays#toString(Object[])
java.util.Arrays#deepToString(Object[])
Parameters: s a string
Returns: the same string with trailing comma trimmed (if any)