jd.util
Class StringUtil

java.lang.Object
  extended byjd.util.StringUtil

public class StringUtil
extends Object

A collection of string utility functions.


Constructor Summary
StringUtil()
           
 
Method Summary
static String fillup(double d, int digits, int decimals)
           
static String fillupLeft(int n, int newlen)
           
static String fillupLeft(int n, int newlen, char fillChar)
           
static String fillupLeft(String s, int newlen)
           
static String fillupLeft(String s, int newlen, char fillchar)
           
static String fillupRight(int n, int newlen)
           
static String fillupRight(String s, int newlen)
           
static String fillupRight(String s, int newlen, char fillchar)
           
static String[] getArray(Vector strings)
           
static byte[] getBytes(String s)
           
static String getClassName(Class c)
          Return the unqualififed name of a class.
static String[] getStrackTrace(Throwable exception)
          Get the stack trace of the Throwable as an array of strings.
static String replace(String s, String oldStr, String newStr)
           
static String replaceSubstring(int begin, String oldString, String newSubstring)
           
static String replicate(int x, char c)
           
static String[] split(String s, int length)
           
static String[] split(String s, String separator)
           
static String startLowerCase(String s)
          Return a string which starts with an lowercase character.
static String startUpperCase(String s)
          Return a string which starts with an uppercase character.
static String trimLeft(String s)
           
static String trimRight(String s)
           
 
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

replace

public static final String replace(String s,
                                   String oldStr,
                                   String newStr)

fillupRight

public static String fillupRight(String s,
                                 int newlen,
                                 char fillchar)

fillupRight

public static String fillupRight(String s,
                                 int newlen)

fillupRight

public static String fillupRight(int n,
                                 int newlen)

fillupLeft

public static String fillupLeft(String s,
                                int newlen,
                                char fillchar)

fillupLeft

public static String fillupLeft(String s,
                                int newlen)

fillupLeft

public static String fillupLeft(int n,
                                int newlen)

fillupLeft

public static String fillupLeft(int n,
                                int newlen,
                                char fillChar)

fillup

public static String fillup(double d,
                            int digits,
                            int decimals)

replicate

public static String replicate(int x,
                               char c)

replaceSubstring

public static String replaceSubstring(int begin,
                                      String oldString,
                                      String newSubstring)

trimLeft

public static String trimLeft(String s)

trimRight

public static String trimRight(String s)

split

public static String[] split(String s,
                             String separator)

split

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

getBytes

public static byte[] getBytes(String s)

getArray

public static String[] getArray(Vector strings)

getClassName

public static String getClassName(Class c)
Return the unqualififed name of a class.


getStrackTrace

public static String[] getStrackTrace(Throwable exception)
Get the stack trace of the Throwable as an array of strings.


startLowerCase

public static String startLowerCase(String s)
Return a string which starts with an lowercase character.


startUpperCase

public static String startUpperCase(String s)
Return a string which starts with an uppercase character.