CharSetUtils.keep : CharSetUtils « Apache Common « Java Tutorial






import org.apache.commons.lang.CharSetUtils;

public class MainClass {
  public static void main(String[] args) {
    //Keeps only the characters specified
    System.out.println("Keep B and o = " +
        CharSetUtils.keep("BorisBecker", "Bo"));
  }
}
Keep B and o = BoB
  Download:  CommonLangCharSetUtils.keep.zip( 199 k)







37.15.CharSetUtils
37.15.1.CharSetUtils.squeeze
37.15.2.CharSetUtils.keep
37.15.3.CharSetUtils.delete
37.15.4.CharSetUtils.count
37.15.5.Build Equals With EqualBuilder