org.luoshu.util.StringUtils Maven / Gradle / Ivy
package org.luoshu.util;
/**
* @author inme
* create: 2020-04-12 21:32
*/
public class StringUtils {
public static boolean isEmpty(String text){
return text == null || "".equals(text);
}
public static boolean isBlank(String text){
return text == null || "".equals(text.trim());
}
public static boolean isNotBlank(String text){
return !isBlank(text);
}
public static boolean isNotEmpty(String text){
return !isEmpty(text);
}
/**
* 这个字符数组中,是否有一个为空
* @param args
* @return 只要有一个为空,则返回 true
*/
public static boolean isAnyBlank(String... args){
if(args == null || args.length == 0){
return true;
}
for (String arg : args) {
return isBlank(arg);
}
return false;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy