Example usage for Java org.apache.commons.lang CharSetUtils fields, constructors, methods, implement or subclass
The text is from its open source code.
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. CharSetUtils.count(null, *) = 0 CharSetUtils.count("", *) = 0 CharSetUtils.count(*, null) = 0 CharSetUtils.count(*, "") = 0 CharSetUtils.count("hello", "k-p") = 3 CharSetUtils.count("hello", "a-e") = 1 |
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. An example would be:
|
String | delete(String str, String set) Takes an argument in set-syntax, see evaluateSet, and deletes any of characters present in the specified string. CharSetUtils.delete(null, *) = null CharSetUtils.delete("", *) = "" CharSetUtils.delete(*, null) = CharSetUtils.delete(*, "") = CharSetUtils.delete("hello", "hl") = "eo" CharSetUtils.delete("hello", "le") = "ho" |
String | delete(String str, String[] set) Takes an argument in set-syntax, see evaluateSet, and deletes any of characters present in the specified string. An example would be:
|
String | keep(String str, String set) Takes an argument in set-syntax, see evaluateSet, and keeps any of characters present in the specified string. CharSetUtils.keep(null, *) = null CharSetUtils.keep("", *) = "" CharSetUtils.keep(*, null) = "" CharSetUtils.keep(*, "") = "" CharSetUtils.keep("hello", "hl") = "hll" CharSetUtils.keep("hello", "le") = "ell" |
String | keep(String str, String[] set) Takes an argument in set-syntax, see evaluateSet, and keeps any of characters present in the specified string. An example would be:
|
String | squeeze(String str, String set) Squeezes any repetitions of a character that is mentioned in the supplied set. CharSetUtils.squeeze(null, *) = null CharSetUtils.squeeze("", *) = "" CharSetUtils.squeeze(*, null) = CharSetUtils.squeeze(*, "") = CharSetUtils.squeeze("hello", "k-p") = "helo" CharSetUtils.squeeze("hello", "a-e") = "hello" |
String | squeeze(String str, String[] set) Squeezes any repetitions of a character that is mentioned in the supplied set. An example is:
|