com.objectfab.tools.junitdoclet
Class StringHelper
java.lang.Object
com.objectfab.tools.junitdoclet.StringHelper
public class StringHelper
- extends java.lang.Object
Method Summary |
private static void |
err(java.lang.String msg)
|
static java.lang.String |
firstToUpper(java.lang.String s)
|
static boolean |
haveEqualContent(java.lang.StringBuffer a,
java.lang.StringBuffer b)
Compares to StringBuffers by their content (and nothing else). |
static int |
indexOfStringInStringBuffer(java.lang.StringBuffer sb,
java.lang.String str)
Emulates the method indexOf in StringBuffer JDK 1.4 in JDKs prior to that. |
static int |
indexOfTwoPartString(java.lang.String code,
java.lang.String partOne,
java.lang.String partTwo,
int startIndex)
|
static java.lang.String |
replaceVariables(java.lang.String template,
java.util.Properties properties)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VARIABLE_START
private static final java.lang.String VARIABLE_START
- See Also:
- Constant Field Values
VARIABLE_END
private static final java.lang.String VARIABLE_END
- See Also:
- Constant Field Values
MAX_DEPTH
private static final int MAX_DEPTH
- See Also:
- Constant Field Values
StringHelper
public StringHelper()
indexOfStringInStringBuffer
public static int indexOfStringInStringBuffer(java.lang.StringBuffer sb,
java.lang.String str)
- Emulates the method indexOf in StringBuffer JDK 1.4 in JDKs prior to that. :-(
indexOfTwoPartString
public static int indexOfTwoPartString(java.lang.String code,
java.lang.String partOne,
java.lang.String partTwo,
int startIndex)
firstToUpper
public static java.lang.String firstToUpper(java.lang.String s)
replaceVariables
public static java.lang.String replaceVariables(java.lang.String template,
java.util.Properties properties)
haveEqualContent
public static boolean haveEqualContent(java.lang.StringBuffer a,
java.lang.StringBuffer b)
- Compares to StringBuffers by their content (and nothing else).
This is helpful, since two StringBuffer's may have the same
content, but the method equals returns false. It seems, some
other attributes of StringBuffer are considered as well, unfortuantely.
err
private static void err(java.lang.String msg)