Java org.apache.commons.lang3 CharSetUtils fields, constructors, methods, implement or subclass

Example usage for Java org.apache.commons.lang3 CharSetUtils fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.commons.lang3 CharSetUtils.

The text is from its open source code.

Subclass

org.apache.commons.lang3.CharSetUtils has subclasses.
Click this link to see all its subclasses.

Method

intcount(final String str, final 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 
Stringdelete(final String str, final 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" 
Stringkeep(final String str, final 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" 
Stringsqueeze(final String str, final 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"