All Downloads are FREE. Search and download functionalities are using the official Maven repository.

cn.yangjunda.hibernate_pagehelper.StringUtil Maven / Gradle / Ivy

There is a newer version: 1.2.1
Show newest version
package cn.yangjunda.hibernate_pagehelper;

/**
 * Created by juanda on 12/6/17.
 */
public class StringUtil {

    public StringUtil() {
    }

    public static boolean isEmpty(String str) {
        return str == null || str.length() == 0;
    }

    public static boolean isNotEmpty(String str) {
        return !isEmpty(str);
    }

    public static boolean isBlank(String str) {
        int strLen;
        if(str != null && (strLen = str.length()) != 0) {
            for(int i = 0; i < strLen; ++i) {
                if(!Character.isWhitespace(str.charAt(i))) {
                    return false;
                }
            }

            return true;
        } else {
            return true;
        }
    }

    public static boolean isNotBlank(String str) {
        return !isBlank(str);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy