com.partnersoft.v3x.text
Class StringLib

java.lang.Object
  extended by com.partnersoft.v3x.text.StringLib

public class StringLib
extends java.lang.Object

Some handy dandy string utils


Constructor Summary
StringLib()
           
 
Method Summary
static boolean isInteger(java.lang.String maybeso)
           
static java.lang.String join(java.util.Iterator i, java.lang.String s)
          this will take the iterators toString values and join them using whatever is in string s
static java.lang.String joinWithQuote(java.util.Iterator i, java.lang.String s)
          here we join the contents of the iterator via string s and put a quote ("'") around the toString values contained in the iterator...
static java.lang.String joinWithQuotes(java.util.Iterator i, java.lang.String s)
           
static void main(java.lang.String[] args)
           
static java.lang.String replace(java.lang.String string, java.lang.String oldStr, java.lang.String newStr)
          this will return a string with all occurances of oldStr replaced by newStr!
static java.lang.String[] split(java.lang.String s, char delim)
          Splits the given string using the given delimeter character.
static java.lang.Object[] split(java.lang.String s, java.lang.String sub)
          will return an Object array of substrings...
 java.lang.String trimToNull(java.lang.String victim)
          Trims a string up to the first null (0x00) character.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringLib

public StringLib()
Method Detail

trimToNull

public java.lang.String trimToNull(java.lang.String victim)
Trims a string up to the first null (0x00) character. Handy for weird C strings.


join

public static java.lang.String join(java.util.Iterator i,
                                    java.lang.String s)
this will take the iterators toString values and join them using whatever is in string s


joinWithQuote

public static java.lang.String joinWithQuote(java.util.Iterator i,
                                             java.lang.String s)
here we join the contents of the iterator via string s and put a quote ("'") around the toString values contained in the iterator...


replace

public static java.lang.String replace(java.lang.String string,
                                       java.lang.String oldStr,
                                       java.lang.String newStr)
this will return a string with all occurances of oldStr replaced by newStr!


split

public static java.lang.Object[] split(java.lang.String s,
                                       java.lang.String sub)
will return an Object array of substrings... i wrote this without looking, there is probably a faster way...


split

public static java.lang.String[] split(java.lang.String s,
                                       char delim)
Splits the given string using the given delimeter character.


main

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

joinWithQuotes

public static java.lang.String joinWithQuotes(java.util.Iterator i,
                                              java.lang.String s)

isInteger

public static boolean isInteger(java.lang.String maybeso)