Bean Builder

com.adventnet.apiutils
Class StringUtil

java.lang.Object
  |
  +--com.adventnet.apiutils.StringUtil

public final class StringUtil
extends java.lang.Object

Class StringUtil is a class which contains all general String related methods.


Constructor Summary
StringUtil()
           
 
Method Summary
static java.lang.String arrToSingleStr(java.lang.String[] arr)
          This method is used for dumping things like array into the config file..
static int atoi(java.lang.String val)
          Converts string to int, different from Integer.parseInt as space before and after are allowed eg : " 123 " .
static boolean isValidIdentifier(java.lang.String s)
          This method checks the given string to find out whether it's For internal use.
static boolean isValidIdentifier(java.lang.String s, boolean showError)
          This method checks the given string to find out whether it's valid identifier or not with a message Dialog based on parameter passed .
static java.lang.String prependBackSlashToDoubleQuote(java.lang.String valueStr)
           
static java.lang.String removeBackSlashBeforeDoubleQuote(java.lang.String valueStr)
           
static java.lang.String replaceStringBySpecifiedString(java.lang.String origString, java.lang.String patternArg, java.lang.String insertStringArg)
          This method replaces a original string by a specified string .
static java.lang.String replaceStringBySpecifiedString(java.lang.String origString, java.lang.String patternArg, java.lang.String insertStringArg, int fromArg)
          This method replaces a original string by a specified string .
static java.lang.String[] singleStrToArr(java.lang.String ss, java.lang.String delimiter)
          This method converts a string to a string array .
 
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

replaceStringBySpecifiedString

public static java.lang.String replaceStringBySpecifiedString(java.lang.String origString,
                                                              java.lang.String patternArg,
                                                              java.lang.String insertStringArg)
This method replaces a original string by a specified string . Also it is efficient for Single char pattern also For internal use.

replaceStringBySpecifiedString

public static java.lang.String replaceStringBySpecifiedString(java.lang.String origString,
                                                              java.lang.String patternArg,
                                                              java.lang.String insertStringArg,
                                                              int fromArg)
This method replaces a original string by a specified string . Also it is efficient for Single char pattern also For internal use.

prependBackSlashToDoubleQuote

public static java.lang.String prependBackSlashToDoubleQuote(java.lang.String valueStr)

removeBackSlashBeforeDoubleQuote

public static java.lang.String removeBackSlashBeforeDoubleQuote(java.lang.String valueStr)

arrToSingleStr

public static java.lang.String arrToSingleStr(java.lang.String[] arr)
This method is used for dumping things like array into the config file.. basicaly when u give an array then this method returns a single string got by concating the individual elements of the array & separating them . For internal use.

singleStrToArr

public static java.lang.String[] singleStrToArr(java.lang.String ss,
                                                java.lang.String delimiter)
This method converts a string to a string array . For internal use.

isValidIdentifier

public static boolean isValidIdentifier(java.lang.String s)
This method checks the given string to find out whether it's For internal use. valid identifier or not with a message Dialog .

isValidIdentifier

public static boolean isValidIdentifier(java.lang.String s,
                                        boolean showError)
This method checks the given string to find out whether it's valid identifier or not with a message Dialog based on parameter passed . For internal use.

atoi

public static int atoi(java.lang.String val)
                throws java.lang.NumberFormatException
Converts string to int, different from Integer.parseInt as space before and after are allowed eg : " 123 " . For internal use.

Bean Builder

© 2001 - 2002 AdventNet Inc. Visit us at: http://www.adventnet.com