org.globus.cog.util
Class StringUtil

java.lang.Object
  extended byorg.globus.cog.util.StringUtil

public class StringUtil
extends Object

This class provides a string split function similar to jdk 1.4 String.split(). Be warned that the split() method in this class does not use regular expressions.


Constructor Summary
StringUtil()
           
 
Method Summary
static String repeat(String s, int times)
           
static String[] split(String s, int length)
           
static String[] split(String string, String separator)
          Splits a string into an array of tokens
static String wordWrap(String arg, int lead, int width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtil

public StringUtil()
Method Detail

split

public static String[] split(String string,
                             String separator)
Splits a string into an array of tokens

Parameters:
string - The string to be split
separator - The separator for the tokens
Returns:
an array with the tokens generated

wordWrap

public static String wordWrap(String arg,
                              int lead,
                              int width)

repeat

public static String repeat(String s,
                            int times)

split

public static String[] split(String s,
                             int length)