edu.umd.cs.findbugs.util
Class Strings

java.lang.Object
  extended by edu.umd.cs.findbugs.util.Strings

public class Strings
extends java.lang.Object

A class for static String utility methods.

Author:
Brian Cole

Constructor Summary
Strings()
           
 
Method Summary
static java.lang.String replace(java.lang.String source, java.lang.String find, java.lang.String repl)
          This is intended to be semantically equivalent to source.replace(find, repl) but also compatible with JDK 1.4.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

replace

public static java.lang.String replace(java.lang.String source,
                                       java.lang.String find,
                                       java.lang.String repl)
This is intended to be semantically equivalent to 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 rusultant String after substitution
Throws:
java.lang.NullPointerException - if any of the arguments are null
java.lang.IllegalArgumentException - if find has zero length
See Also:
String.replace(CharSequence target, CharSequence replacement)