org.neodatis.tool.wrappers
Class OdbString

java.lang.Object
  extended by org.neodatis.tool.wrappers.OdbString

public class OdbString
extends java.lang.Object

Author:
olivier

Constructor Summary
OdbString()
           
 
Method Summary
static boolean equalsIgnoreCase(java.lang.String s1, java.lang.String s2)
           
static java.lang.String exceptionToString(java.lang.Throwable e, boolean escape)
          If escape==true, then remove $.
static boolean matches(java.lang.String regExp, java.lang.String value)
           
static java.lang.String replaceToken(java.lang.String source, java.lang.String tokenToReplace, java.lang.String newToken)
          Replace a string within a string
static java.lang.String replaceToken(java.lang.String source, java.lang.String tokenToReplace, java.lang.String newToken, int numberOfTimes)
          Replace a string within a string
static java.lang.String[] split(java.lang.String source, java.lang.String separators)
           
static java.lang.String substring(java.lang.String s, int beginIndex)
           
static java.lang.String substring(java.lang.String s, int beginIndex, int endIndex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdbString

public OdbString()
Method Detail

split

public static java.lang.String[] split(java.lang.String source,
                                       java.lang.String separators)

replaceToken

public static java.lang.String replaceToken(java.lang.String source,
                                            java.lang.String tokenToReplace,
                                            java.lang.String newToken)
Replace a string within a string

Parameters:
source - The String to modify
tokenToReplace - The Token to replace
newToken - The new Token
Returns:
String The new String
Throws:
java.lang.RuntimeException - where trying to replace by a new token and this new token contains the token to be replaced

replaceToken

public static java.lang.String replaceToken(java.lang.String source,
                                            java.lang.String tokenToReplace,
                                            java.lang.String newToken,
                                            int numberOfTimes)
Replace a string within a string

Parameters:
source - The String to modify
tokenToReplace - The Token to replace
newToken - The new Token
numberOfTimes - The number of time, the replace operation must be done. -1 means replace all
Returns:
String The new String
Throws:
java.lang.RuntimeException - where trying to replace by a new token and this new token contains the token to be replaced

exceptionToString

public static java.lang.String exceptionToString(java.lang.Throwable e,
                                                 boolean escape)
If escape==true, then remove $.

Parameters:
e -
escape -
Returns:

substring

public static java.lang.String substring(java.lang.String s,
                                         int beginIndex)

substring

public static java.lang.String substring(java.lang.String s,
                                         int beginIndex,
                                         int endIndex)

equalsIgnoreCase

public static boolean equalsIgnoreCase(java.lang.String s1,
                                       java.lang.String s2)

matches

public static boolean matches(java.lang.String regExp,
                              java.lang.String value)