CharSetUtils: delete(String str, String[] set) (2) : CharSetUtils « org.apache.commons.lang « Java by API






CharSetUtils: delete(String str, String[] set) (2)

/*
Delete B and o = risecker
Delete B,o,k,e and r = isc
 */
import org.apache.commons.lang.CharSetUtils;

public class CharSetUtilsTrial {
  public static void main(String[] args) {
    // Specified characters deleted.
    System.out.println("Delete B and o = " + CharSetUtils.delete("BorisBecker", "Bo")); // risecker
    System.out.println("Delete B,o,k,e and r = "
        + CharSetUtils.delete("BorisBecker", new String[] { "Bo", "ker" })); // isc

  }
}

           
       








Apache-Common-Lang.zip( 248 k)

Related examples in the same category

1.CharSetUtils: count(String str, String set)
2.CharSetUtils: count(String str, String[] set) (2)
3.CharSetUtils: delete(String str, String set)
4.CharSetUtils: keep(String str, String set)
5.CharSetUtils: squeeze(String str, String set)