2011-10-27 14:50:23 -04:00
|
|
|
package com.fsck.k9.helper;
|
|
|
|
|
2011-10-29 02:12:49 -04:00
|
|
|
public final class StringUtils {
|
|
|
|
|
|
|
|
public static boolean isNullOrEmpty(String string){
|
2014-02-15 17:47:56 -05:00
|
|
|
return string == null || string.isEmpty();
|
2011-10-29 02:12:49 -04:00
|
|
|
}
|
|
|
|
|
2012-12-07 06:03:04 -05:00
|
|
|
public static boolean containsAny(String haystack, String[] needles) {
|
|
|
|
if (haystack == null) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
for (String needle : needles) {
|
|
|
|
if (haystack.contains(needle)) {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
2011-10-27 14:50:23 -04:00
|
|
|
}
|