package org.linlinjava.jz.core.util;

public class PhoneNumberUtil {

    /**
     * 手机号码判断
     * @param mobile
     * @return
     */
    public  static  boolean isMobile(String mobile){
        if(StringUtils.isEmpty(mobile)||!StringUtils.isNumeric(mobile)) return false;
        if(mobile.length()!=11) return false;
        if(mobile.substring(0,1)!="1") return false;

        return true ;
    }


    public static String HideMobile(String mobile) {
        if (mobile != null && mobile.length() >= 11)
            mobile = mobile.substring(0, 3) + "****" + mobile.substring(7);

        return mobile;
    }
}
