com.electricvine
Class Utils

java.lang.Object
  |
  +--com.electricvine.Utils

public class Utils
extends java.lang.Object

General utility functions
These functions are generally used internally by Bullseye, and will not need to be accessed in most implementations of Bullseye.


Constructor Summary
Utils()
           
 
Method Summary
static java.lang.Object ArrayPush(java.lang.Object aoIn, java.lang.Object oAppend)
          This adds an element to an existing array, and returns a new array.
static java.lang.String Ascii2String(int nCode)
          Converts ascii into its string equivalent.
static java.lang.String ChopZero(double dIn)
          This removes any trailing decimal point followed by zero from a Double and returns it as a string.
static boolean isInteger(java.lang.String sStringIn)
          Tests if string contains an integer, and returns a boolean value.
static java.lang.String Join(java.lang.String[] asIn, java.lang.String sDelim)
          This returns a delimited string created from an array.
static java.lang.String Left(java.lang.String sIn, int nDigits)
          Returns part of a passed in string, by counting characters from the left side.
static java.lang.String ReplaceString(java.lang.String sStart, java.lang.String sFind, java.lang.String sReplace)
          This replaces all occurences of a specified substring with another and returns the new string.
static java.lang.String Right(java.lang.String sIn, int nDigits)
          This returns part of a passed in string, by counting characters from the right side.
static double Round(double dIn, int nDig)
           
static java.lang.String[] SortArray(java.lang.String[] asIn)
           
static java.lang.String[] Split(java.lang.String sIn, java.lang.String sDelim)
          This returns an array created by splitting a delimited string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

Right

public static java.lang.String Right(java.lang.String sIn,
                                     int nDigits)
This returns part of a passed in string, by counting characters from the right side.

Parameters:
sIn - String to be searched
nDigits - Number of characters to count from the right

Left

public static java.lang.String Left(java.lang.String sIn,
                                    int nDigits)
Returns part of a passed in string, by counting characters from the left side.

Parameters:
sIn - String to be searched
nDigits - Number of characters to count from the left

Ascii2String

public static java.lang.String Ascii2String(int nCode)
Converts ascii into its string equivalent.

Parameters:
nCode - Ascii code passed in

Round

public static double Round(double dIn,
                           int nDig)

ChopZero

public static java.lang.String ChopZero(double dIn)
This removes any trailing decimal point followed by zero from a Double and returns it as a string.

Parameters:
dIn - Double value

Split

public static java.lang.String[] Split(java.lang.String sIn,
                                       java.lang.String sDelim)
This returns an array created by splitting a delimited string.

Parameters:
sIn - String
sDelim - String or character delimiter

Join

public static java.lang.String Join(java.lang.String[] asIn,
                                    java.lang.String sDelim)
This returns a delimited string created from an array.

Parameters:
asIn - String[]
sDelim - String or character delimiter

ArrayPush

public static java.lang.Object ArrayPush(java.lang.Object aoIn,
                                         java.lang.Object oAppend)
This adds an element to an existing array, and returns a new array.

Parameters:
aoIn - Array object
oAppend - Object to add to the array

SortArray

public static java.lang.String[] SortArray(java.lang.String[] asIn)

ReplaceString

public static java.lang.String ReplaceString(java.lang.String sStart,
                                             java.lang.String sFind,
                                             java.lang.String sReplace)
This replaces all occurences of a specified substring with another and returns the new string.

Parameters:
sStart - String value to be evaluated
sFind - String initial search string
sReplace - String replacement value

isInteger

public static boolean isInteger(java.lang.String sStringIn)
Tests if string contains an integer, and returns a boolean value.

Parameters:
sStringIn - String value to be evaluated