org.codehaus.aspectwerkz.util
Class Strings

java.lang.Object
  extended byorg.codehaus.aspectwerkz.util.Strings

public class Strings
extends java.lang.Object

Utility methods for strings.

Author:
Jonas Bonér

Method Summary
static java.lang.String replaceSubString(java.lang.String str, java.lang.String oldToken, java.lang.String newToken)
          Replaces all occurences of a substring inside a string.
static java.lang.String replaceSubString(java.lang.String str, java.lang.String oldToken, java.lang.String newToken, int max)
          Replaces all occurences of a substring inside a string.
static java.lang.String[] splitString(java.lang.String sS, java.lang.String sD)
          String split on multicharacter delimiter author Tim Quinn (tim.quinn@honeywell.com)
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

replaceSubString

public static java.lang.String replaceSubString(java.lang.String str,
                                                java.lang.String oldToken,
                                                java.lang.String newToken)
Replaces all occurences of a substring inside a string.

Parameters:
str - the string to search and replace in
oldToken - the string to search for
newToken - the string to replace newToken
Returns:
the new string

replaceSubString

public static java.lang.String replaceSubString(java.lang.String str,
                                                java.lang.String oldToken,
                                                java.lang.String newToken,
                                                int max)
Replaces all occurences of a substring inside a string.

Parameters:
str - the string to search and replace in
oldToken - the string to search for
newToken - the string to replace newToken
max - maximum number of values to replace (-1 => no maximum)
Returns:
the new string

splitString

public static final java.lang.String[] splitString(java.lang.String sS,
                                                   java.lang.String sD)
String split on multicharacter delimiter author Tim Quinn (tim.quinn@honeywell.com)



Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.