com.bluemarsh.jswat.util
Class StringUtils

java.lang.Object
  |
  +--com.bluemarsh.jswat.util.StringUtils

public class StringUtils
extends java.lang.Object

Provides utility methods for handling Strings.

Author:
Nathan Fiedler

Field Summary
protected static java.lang.String[] zeros
          Array of zeros for padding numbers.
 
Constructor Summary
StringUtils()
           
 
Method Summary
static java.lang.String toHexString(int i)
          Converts the given integer to a four-digit, hexadecimal string, padding with zeros as needed.
static java.lang.String[] tokenize(java.lang.String input)
          Take the given string and chop it up into a series of strings on whitespace boundries.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

zeros

protected static java.lang.String[] zeros
Array of zeros for padding numbers.
Constructor Detail

StringUtils

public StringUtils()
Method Detail

toHexString

public static java.lang.String toHexString(int i)
Converts the given integer to a four-digit, hexadecimal string, padding with zeros as needed.
Parameters:
i - integer to convert.
Returns:
String representation.

tokenize

public static java.lang.String[] tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries. This is useful for trying to get an array of strings out of the resource file. If input is null, returns a zero-length array of String.
Parameters:
input - string to be split apart.
Returns:
array of strings from input.