com.ge.research.utils
Class StringUtils

java.lang.Object
  extended bycom.ge.research.utils.StringUtils
Direct Known Subclasses:
StringUtils

public class StringUtils
extends java.lang.Object

A utility class with common useful string constants and common useful string methods.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:39 $
Author:
garbiras
Created on:
Aug 20, 2002

Field Summary
static java.lang.String DOUBLEQUOTE
          The double quotation mark Defined here for efficiency, rather than have to construct a new String object each time to deal with the quotation marks.
static java.lang.String EMPTY_STRING
          The empty string Defined here for efficiency, rather than have to construct a new String object each time to deal with the empty string.
protected static java.lang.String LOWERCASE_LETTERS
          The set of lowercase letters
static java.lang.String NEWLINE
          The new line character Defined here for efficiency, rather than have to construct a new String object each time to deal with a newline.
static java.lang.String SINGLEQUOTE
          The single quotation mark Defined here for efficiency, rather than have to construct a new String object each time to deal with the quotation marks.
static java.lang.String SPACE
          The space chacter mark Defined here for efficiency, rather than have to construct a new String object each time to deal with a space string.
static java.lang.String TAB
          The tab character Defined here for efficiency, rather than have to construct a new String object each time to deal with a tab.
protected static java.lang.String UPPERCASE_LETTERS
          The set of uppercase letters
 
Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String initCap(java.lang.String string)
          Capitalizes the first character of the string.
static boolean isNullOrEmpty(java.lang.String testcase)
          Checks the testcase to see if it is null or equal to the EMPTY_STRING
static java.lang.String separateInitCapString(java.lang.String string)
          Separates a string that is in "INIT CAP" form, i.e.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
The empty string Defined here for efficiency, rather than have to construct a new String object each time to deal with the empty string.

See Also:
Constant Field Values

SPACE

public static final java.lang.String SPACE
The space chacter mark Defined here for efficiency, rather than have to construct a new String object each time to deal with a space string.

See Also:
Constant Field Values

DOUBLEQUOTE

public static final java.lang.String DOUBLEQUOTE
The double quotation mark Defined here for efficiency, rather than have to construct a new String object each time to deal with the quotation marks.

See Also:
Constant Field Values

SINGLEQUOTE

public static final java.lang.String SINGLEQUOTE
The single quotation mark Defined here for efficiency, rather than have to construct a new String object each time to deal with the quotation marks.

See Also:
Constant Field Values

NEWLINE

public static final java.lang.String NEWLINE
The new line character Defined here for efficiency, rather than have to construct a new String object each time to deal with a newline.

See Also:
Constant Field Values

TAB

public static final java.lang.String TAB
The tab character Defined here for efficiency, rather than have to construct a new String object each time to deal with a tab.

See Also:
Constant Field Values

UPPERCASE_LETTERS

protected static final java.lang.String UPPERCASE_LETTERS
The set of uppercase letters

See Also:
Constant Field Values

LOWERCASE_LETTERS

protected static final java.lang.String LOWERCASE_LETTERS
The set of lowercase letters

See Also:
Constant Field Values
Constructor Detail

StringUtils

public StringUtils()
Method Detail

isNullOrEmpty

public static final boolean isNullOrEmpty(java.lang.String testcase)
Checks the testcase to see if it is null or equal to the EMPTY_STRING

Parameters:
testcase - the string to test
Returns:
true if testcase is null or equal to EMPTY_STRING; false otherwise.

initCap

public static java.lang.String initCap(java.lang.String string)
Capitalizes the first character of the string.

Parameters:
string - the string to capitalize
Returns:
The capitalized string. null if the string was null to begin with.

separateInitCapString

public static java.lang.String separateInitCapString(java.lang.String string)
Separates a string that is in "INIT CAP" form, i.e. "HelloThereMan" into a string with the init cap sections seperated with spaces, i.e. "Hello There Man"

Parameters:
string - the string to insert spaces into
Returns:
The readable init cap string. null if the string was null to begin with.