package cn.com.tenlion.systembase.util;


/**
 * 校验工具类
 */
public class VerifyUtil {


    /**
     * 身份证校验
     * @param v
     * @return
     */
    public static Boolean IdCard(String v){


        return false;
    }

    public static String[] splitStringByLength(String src, int length) {
        //检查参数是否合法
        if (null == src || src.equals("")) {
            return null;
        }
        if (length <= 0) {
            return null;
        }
        //获取整个字符串可以被切割成字符子串的个数
        int n = (src.length() + length - 1) / length;
        String[] split = new String[n];
        for (int i = 0; i < n; i++) {
            if (i < (n -1)) {
                split[i] = src.substring(i * length, (i + 1) * length);
            } else {
                split[i] = src.substring(i * length);
            }
        }
        return split;
    }
}
