- /**1.CommonUtils**/
- public static long parseLong(String s, long defaultValue)//将字符串数字转换为long类型的数字
- {
- try
- {
- return Long.parseLong(s);
- }
- catch(Exception e)
- {
- return defaultValue;
- }
- }
-
- public static long parseLong(String s)
- {
- return parseLong(s, -1L);//默认为-1
- }
-
-
-
-
-
- /**1.IMUtils极光推送**/
- public static boolean isMobile(String mobile)//判断是否为电话号码
- {
- return CommonUtils.parseLong(mobile) >= 0L ? Pattern.matches("^1(3|4|5|7|8)\\d{9}$", mobile) : false;
- }