org.objectweb.cjdbc.common.util
Class Strings

java.lang.Object
  extended byorg.objectweb.cjdbc.common.util.Strings

public class Strings
extends java.lang.Object

This class provides utilities for Strings manipulation.

Version:
1.0
Author:
Marc Wick, Mathieu Peltier

Constructor Summary
Strings()
           
 
Method Summary
static java.lang.String replace(java.lang.String sourceString, java.lang.String replace, java.lang.String with)
          Replaces all occurrences of a String within another String.
static java.lang.String replaceCasePreserving(java.lang.String sourceString, java.lang.String replace, java.lang.String with)
          Replaces all occurrences of a String within another String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Strings

public Strings()
Method Detail

replace

public static java.lang.String replace(java.lang.String sourceString,
                                       java.lang.String replace,
                                       java.lang.String with)
Replaces all occurrences of a String within another String.

Parameters:
sourceString - source String
replace - text pattern to replace
with - replacement text
Returns:
the text with any replacements processed, null if null String input

replaceCasePreserving

public static java.lang.String replaceCasePreserving(java.lang.String sourceString,
                                                     java.lang.String replace,
                                                     java.lang.String with)
Replaces all occurrences of a String within another String. The String to be replaced will be replaced ignoring cases, all other cases are preserved in the returned string

Parameters:
sourceString - source String
replace - text to replace, case insensitive
with - replacement text
Returns:
the text with any replacements processed, null if null String input


Copyright © 2002, 2005 - ObjectWeb Consortium - All Rights Reserved.