package com.fzm.mall.midea.pay.utils;

/**
 * 字符处理工具
 *
 * @author harvey
 * @date 2020/8/31
 * @email husy7@midea.com
 */
public class StringUtils {

    public static boolean isNotEmpty(String... values) {

        boolean result = true;
        if (values == null || values.length == 0) {
            result = false;
        } else {
            for (String value : values) {
                result &= !isEmpty(value);
            }
        }
        return result;
    }

    public static boolean isEmpty(String value) {

        int strLen;
        if (value == null || (strLen = value.length()) == 0) {
            return true;
        }
        for (int i = 0; i < strLen; i++) {
            if ((Character.isWhitespace(value.charAt(i)) == false)) {
                return false;
            }
        }
        return true;
    }

}
