StringUtils: containsNone(String str, String invalidChars)
/*
14) Check that ABCD contains none of !@#$%^&* >>>true
*/
import org.apache.commons.lang.StringUtils;
public class StringUtilsTrial {
public static void main(String[] args) {
// Check that a string does not contain any of these characters !@#$%^&*
System.out.println("14) Check that ABCD contains none of !@#$%^&* >>>"
+ StringUtils.containsNone("ABCD", "!@#$%^&*"));
}
}
Apache-Common-Lang.zip( 248 k)Related examples in the same category