|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--org.apache.commons.lang.CharSetUtils
Numerous routines to manipulate a character set.
| Constructor Summary | |
CharSetUtils()
CharSetUtils instances should NOT be constructed in standard programming. |
|
| Method Summary | |
static int |
count(String str,
String set)
Takes an argument in set-syntax, see evaluateSet, and returns the number of characters present in the specified string. |
static int |
count(String str,
String[] set)
Takes an argument in set-syntax, see evaluateSet, and returns the number of characters present in the specified string. |
static String |
delete(String str,
String set)
Takes an argument in set-syntax, see evaluateSet, and deletes any of characters present in the specified string. |
static String |
delete(String str,
String[] set)
Takes an argument in set-syntax, see evaluateSet, and deletes any of characters present in the specified string. |
static CharSet |
evaluateSet(String[] set)
Creates a CharSetUtils object which allows a certain amount of set logic to be performed upon the following syntax: "aeio" which implies 'a','e',.. |
static String |
squeeze(String str,
String set)
Squeezes any repititions of a character that is mentioned in the supplied set. |
static String |
squeeze(String str,
String[] set)
Squeezes any repititions of a character that is mentioned in the supplied set. |
static String |
translate(String target,
String repl,
String with)
Translate characters in a String. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CharSetUtils()
CharSetUtils.evaluateSet(null);.
This constructor is public to permit tools that require a JavaBean instance
to operate.
| Method Detail |
public static CharSet evaluateSet(String[] set)
set -
NullPointerException - if any of set[i] is null or if set is null
public static String squeeze(String str,
String set)
str - the string to work fromset - the character set to use for manipulation
public static String squeeze(String str,
String[] set)
str - the string to work fromset - the character set to use for manipulation
NullPointerException - if str is null
public static int count(String str,
String set)
str - String target to count characters inset - String set of characters to count
public static int count(String str,
String[] set)
str - String target to count characters inset - String[] set of characters to count
public static String delete(String str,
String set)
str - String target to delete characters fromset - String set of characters to delete
public static String delete(String str,
String[] set)
str - String target to delete characters fromset - String[] set of characters to delete
NullPointerException - of str is null
public static String translate(String target,
String repl,
String with)
target - String to replace characters inrepl - String to find that will be replacedwith - String to put into the target String
NullPointerException - if target, with or repl is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||