com.nitidus.wt.fastload
Class cUtilFunctions

java.lang.Object
  extended bycom.nitidus.wt.fastload.cUtilFunctions

public class cUtilFunctions
extends Object

Some utility functions, taken from CounterPart, but we don't want to compile counter part classes


Constructor Summary
cUtilFunctions()
           
 
Method Summary
static int stringToInt(String s)
          convert a string to an integer, ignoring conversion errors.
private static int stringToInt(String s, int errorValue)
          convert a string to an integer, returning given value in case of errors.
static String strip(String s)
          Strip a string: turn control characters into spaces; remove leading and trailing spaces; compress embedded spaces to a single space.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

cUtilFunctions

public cUtilFunctions()
Method Detail

stringToInt

private static final int stringToInt(String s,
                                     int errorValue)
convert a string to an integer, returning given value in case of errors.

Parameters:
s - the string
errorValue - the number to return if s doesn't seem to be convertible

stringToInt

public static final int stringToInt(String s)
convert a string to an integer, ignoring conversion errors.

Parameters:
s - the string

strip

public static final String strip(String s)
Strip a string: turn control characters into spaces; remove leading and trailing spaces; compress embedded spaces to a single space.

Parameters:
s - the string
Returns:
the string stripped