List of usage examples for java.lang CharSequence chars
public default IntStream chars()
From source file:com.qwazr.utils.StringUtils.java
public static boolean anyDigit(CharSequence chars) { if (chars == null) return false; return chars.chars().anyMatch(new IntPredicate() { @Override/*w ww . j av a 2 s. c o m*/ public boolean test(int value) { return Character.isDigit(value); } }); }
From source file:com.qwazr.utils.StringUtils.java
public static boolean anyAlpha(CharSequence chars) { if (chars == null) return false; return chars.chars().anyMatch(new IntPredicate() { @Override/*from w w w . ja v a 2 s . c o m*/ public boolean test(int value) { return Character.isAlphabetic(value); } }); }