com.resilientedge.util
Class StringUtil

java.lang.Object
  |
  +--com.resilientedge.util.StringUtil

public class StringUtil
extends java.lang.Object

This class provides common strings and static string-related methods.

Author:
jgardner

Field Summary
static java.lang.String AMPERSTAND
          Description of the Field
static java.lang.String APOSTROPHE
          Description of the Field
static java.lang.String ASTERISK
          Description of the Field
static java.lang.String AT
          Description of the Field
static java.lang.String BACK_SLASH1
          Description of the Field
static java.lang.String COLON
          Description of the Field
static java.lang.String COMMA
          Description of the Field
static java.lang.String COMMA_BLANK
          Description of the Field
static java.lang.String DOT
          Description of the Field
static java.lang.String DOUBLE_APOSTROPHE
          Description of the Field
static java.lang.String ELLIPSIS
          Description of the Field
static java.lang.String EMPTY_STRING
          Description of the Field
static java.lang.String EQUALS
          Description of the Field
static java.lang.String FORWARD_SLASH1
          Description of the Field
static java.lang.String FORWARD_SLASH2
          Description of the Field
static java.lang.String GREATER_THAN
          Description of the Field
static java.lang.String HASH
          Description of the Field
static java.lang.String HYPHEN
          Description of the Field
static java.lang.String LEFT_PAREN
          Description of the Field
static java.lang.String LESS_THAN
          Description of the Field
static java.lang.String LINE_SEPARATOR
          Description of the Field
static java.lang.String n_STRING
          Description of the Field
static java.lang.String N_STRING
          Description of the Field
static java.lang.String ONE_BLANK
          Description of the Field
static java.lang.String PERIOD
          Description of the Field
static java.lang.String QUESTION_MARK
          Description of the Field
static java.lang.String QUOTE
          Description of the Field
static java.lang.String RIGHT_PAREN
          Description of the Field
static java.lang.String SEMICOLON
          Description of the Field
static java.lang.String SPACE
          Description of the Field
static java.lang.String SQUOTE
          Description of the Field
static java.lang.String SQUOTE_COMMA
          Description of the Field
static java.lang.String TRUE
          Description of the Field
static java.lang.String y_STRING
          Description of the Field
static java.lang.String Y_STRING
          Description of the Field
 
Constructor Summary
StringUtil()
           
 
Method Summary
static void append(java.lang.StringBuffer buffer, java.lang.String string, int repeat)
           
static java.lang.String getClassName(java.lang.Class theClass)
          Returns the class name of this class, without the package
static java.lang.String getClassName(java.lang.String className)
          Returns the class name of this class, without the package
static java.lang.String getFileExtension(java.lang.String name)
          Returns the file extension for the given string, or "" if no extension separator is found
static java.lang.String getFilenameNoExtension(java.lang.String name)
          Returns the filename without extension for the given string
static java.lang.String getPackageName(java.lang.Class theClass)
          Returns the package name of this class, without the classname
static java.lang.String null2Empty(java.lang.String arg)
          Accepts a string to check for a null value.
static java.lang.String removeTextFromString(java.lang.String string, java.lang.String textToRemove)
           
static java.lang.String[] split(java.lang.String stringToSplit, java.lang.String delimeter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AMPERSTAND

public static final java.lang.String AMPERSTAND
Description of the Field

APOSTROPHE

public static final java.lang.String APOSTROPHE
Description of the Field

ASTERISK

public static final java.lang.String ASTERISK
Description of the Field

AT

public static final java.lang.String AT
Description of the Field

BACK_SLASH1

public static final java.lang.String BACK_SLASH1
Description of the Field

COLON

public static final java.lang.String COLON
Description of the Field

COMMA

public static final java.lang.String COMMA
Description of the Field

COMMA_BLANK

public static final java.lang.String COMMA_BLANK
Description of the Field

DOT

public static final java.lang.String DOT
Description of the Field

ELLIPSIS

public static final java.lang.String ELLIPSIS
Description of the Field

EMPTY_STRING

public static final java.lang.String EMPTY_STRING
Description of the Field

EQUALS

public static final java.lang.String EQUALS
Description of the Field

FORWARD_SLASH1

public static final java.lang.String FORWARD_SLASH1
Description of the Field

FORWARD_SLASH2

public static final java.lang.String FORWARD_SLASH2
Description of the Field

GREATER_THAN

public static final java.lang.String GREATER_THAN
Description of the Field

HASH

public static final java.lang.String HASH
Description of the Field

HYPHEN

public static final java.lang.String HYPHEN
Description of the Field

LEFT_PAREN

public static final java.lang.String LEFT_PAREN
Description of the Field

LESS_THAN

public static final java.lang.String LESS_THAN
Description of the Field

LINE_SEPARATOR

public static final java.lang.String LINE_SEPARATOR
Description of the Field

N_STRING

public static final java.lang.String N_STRING
Description of the Field

n_STRING

public static final java.lang.String n_STRING
Description of the Field

ONE_BLANK

public static final java.lang.String ONE_BLANK
Description of the Field

PERIOD

public static final java.lang.String PERIOD
Description of the Field

QUESTION_MARK

public static final java.lang.String QUESTION_MARK
Description of the Field

QUOTE

public static final java.lang.String QUOTE
Description of the Field

RIGHT_PAREN

public static final java.lang.String RIGHT_PAREN
Description of the Field

SEMICOLON

public static final java.lang.String SEMICOLON
Description of the Field

SQUOTE

public static final java.lang.String SQUOTE
Description of the Field

SQUOTE_COMMA

public static final java.lang.String SQUOTE_COMMA
Description of the Field

SPACE

public static final java.lang.String SPACE
Description of the Field

TRUE

public static final java.lang.String TRUE
Description of the Field

Y_STRING

public static final java.lang.String Y_STRING
Description of the Field

y_STRING

public static final java.lang.String y_STRING
Description of the Field

DOUBLE_APOSTROPHE

public static final java.lang.String DOUBLE_APOSTROPHE
Description of the Field
Constructor Detail

StringUtil

public StringUtil()
Method Detail

getClassName

public static java.lang.String getClassName(java.lang.Class theClass)
Returns the class name of this class, without the package
Parameters:
theClass - Description of Parameter
Returns:
the classname

getClassName

public static java.lang.String getClassName(java.lang.String className)
Returns the class name of this class, without the package
Parameters:
theClass - Description of Parameter
Returns:
the classname

getPackageName

public static java.lang.String getPackageName(java.lang.Class theClass)
Returns the package name of this class, without the classname
Parameters:
theClass - Description of Parameter
Returns:
the class

getFilenameNoExtension

public static final java.lang.String getFilenameNoExtension(java.lang.String name)
Returns the filename without extension for the given string
Parameters:
name - the filename to parse
Returns:
the filename for the given string

getFileExtension

public static final java.lang.String getFileExtension(java.lang.String name)
Returns the file extension for the given string, or "" if no extension separator is found
Parameters:
name - the filename to parse
Returns:
the file extension for the given string

null2Empty

public static java.lang.String null2Empty(java.lang.String arg)
Accepts a string to check for a null value. If the string is null, return and empty string.
Parameters:
arg - a string to be checked
Returns:
the original string if not null or an empty string

split

public static java.lang.String[] split(java.lang.String stringToSplit,
                                       java.lang.String delimeter)

append

public static void append(java.lang.StringBuffer buffer,
                          java.lang.String string,
                          int repeat)

removeTextFromString

public static java.lang.String removeTextFromString(java.lang.String string,
                                                    java.lang.String textToRemove)


Copyright © 2001 Resilient Edge, Inc. All Rights Reserved.