Class Strings

java.lang.Object
  extended by Strings

public class Strings
extends java.lang.Object

Strings is a class that allows you to get certain properties about a string.
Required command line options:


                FUNCTION        [character string] The function you want to perform on the string.
                PARAMETER       [character string] Parameter to return.
                STRING          [character string] The string that you want to run the specified
                                        function on.

Possible functions and their arguments.
                strlen          Returns the length of the string.
                        arguments: NONE
                scaseup         Returns the string in all upper case.
                        arguments: NONE
                scasedown       Returns the string in all lower case.
                        arguments: NONE
                substr          Returns a substring of length bytes at start_byte.
                        arguments:
                                START_BYTE      [integer] The first byte of the substring. If the 
                                                        number is negative the substring count start from 
                                                        the end of the string or 
                                                        "index(string substring, int occurence)"
                                BYTES           [integer] The length of the substring to be returned
                                                        or "index(string substring, int occurence)"
                        example 1:
                                param=SSTIME string="1999-03-03T00:00:00.000" start=0 byte="index(:, 2)"
              would return $SSTIME = 1999-03-03T00:00
                        example 2:
                                param=STR string="This is a test run" start="index(is, 1)" byte="index(tes, 1)"
              would return $STR = "is is a "
                index           Returns the index of the first character of the given 
                                        occurrence the substring.
                        arguments:
                                SUBSTRING       [character string] The string to search the original 
                                                        string for.
                                OCCURRENCE      [integer] The occurence of this substring you want 
                                                        to return the index of.
                                                        If occurence=0 the index of the last occurence of the
                                                        substring is returned.
                stoken          Returns the nth token after of the original string.
                                TOKEN   [character string] The substring to tokenize the string.
                                INDEX   [integer] The index of the token in the array of tokens 
                                                you want to return.
                        example 1: 
                                PARAM=NUM STRING="1,2,3,4" FUNC=stoken TOKEN="," INDEX=2
                                would return $NUM="2"

Since:
1.0

Constructor Summary
Strings()
           
 
Method Summary
static int index(java.lang.String substring, int count)
           
static void main(java.lang.String[] args)
           
static java.lang.String sCaseDown()
           
static java.lang.String sCaseUp()
           
static java.lang.String sToken(java.lang.String token, int index)
           
static int strlen()
           
static java.lang.String substr(int startByte, int Bytes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

main

public static void main(java.lang.String[] args)

strlen

public static int strlen()

sCaseUp

public static java.lang.String sCaseUp()

sCaseDown

public static java.lang.String sCaseDown()

substr

public static java.lang.String substr(int startByte,
                                      int Bytes)

index

public static int index(java.lang.String substring,
                        int count)

sToken

public static java.lang.String sToken(java.lang.String token,
                                      int index)