gov.sandia.cognition.util
Class StringUtil

java.lang.Object
  extended by gov.sandia.cognition.util.StringUtil

public class StringUtil
extends Object

The Strings class implements static utility methods for dealing with String objects.

Since:
2.0
Author:
Justin Basilico

Constructor Summary
StringUtil()
           
 
Method Summary
static String capitalizeFirstCharacter(String s)
          Capitalizes the first character of the given string.
static boolean isEmpty(String s)
          Returns true if the given String is null or empty.
static boolean isWhitespace(String s)
          Returns true if the given String is null or all whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

isEmpty

public static boolean isEmpty(String s)
Returns true if the given String is null or empty.

Parameters:
s - A string.
Returns:
True if the given String is null or empty.

isWhitespace

public static boolean isWhitespace(String s)
Returns true if the given String is null or all whitespace.

Parameters:
s - A string.
Returns:
True if the given String is null or all whitespace.

capitalizeFirstCharacter

public static String capitalizeFirstCharacter(String s)
Capitalizes the first character of the given string.

Parameters:
s - The string to capitalize.
Returns:
The given string with the first character capitalized.