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

com.zys.mybatis.utils.StringUtils Maven / Gradle / Ivy

There is a newer version: 0.2.7
Show newest version
package com.zys.mybatis.utils;

/**
 * @author zys
 * @version 1.0
 * @date 2021/1/25 15:47
 */
public class StringUtils {

    public static boolean isNotBlank(CharSequence cs) {
        return !isBlank(cs);
    }

    public static boolean isBlank(CharSequence cs) {
        int strLen = length(cs);
        if (strLen != 0) {
            for (int i = 0; i < strLen; ++i) {
                if (!Character.isWhitespace(cs.charAt(i))) {
                    return false;
                }
            }
        }
        return true;
    }

    public static int length(CharSequence cs) {
        return cs == null ? 0 : cs.length();
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy