/** * 隐藏手机号中间4位 * * @param code * @return * @throws Exception */ public static String getCode(String code) throws Exception { if (code != null && !TextUtils.isEmpty(code) && code.length() == 11) { return code.substring(0, 3) + "****" + code.substring(code.length() - 4); } else throw new Exception("手机号码有误"); }
隐藏手机中间四位
最新推荐文章于 2022-03-27 21:05:40 发布