admin
2021-07-28 c0269fcfa876b9c5cf309b2006462b4d09c5ef95
APPUpdate/src/com/ysh/wpc/appupdate/util/StringUtils.java
@@ -13,7 +13,7 @@
import android.content.Context;
import android.content.pm.PackageManager;
import android.os.Build;
import android.support.v4.content.ContextCompat;
import androidx.core.content.ContextCompat;
import android.telephony.TelephonyManager;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
@@ -60,11 +60,7 @@
   // 妫?祴瀛楃涓叉槸鍚︾鍚堢敤鎴峰悕
   public static boolean checkingMsg(int len) {
      boolean isValid = true;
      if (5 < len && len < 21) {
         isValid = false;
      } else {
         isValid = true;
      }
        isValid = 5 >= len || len >= 21;
      return isValid;
   }
@@ -91,9 +87,7 @@
   public static boolean isDouble(String value) {
      try {
         Double.parseDouble(value);
         if (value.contains("."))
            return true;
         return false;
            return value.contains(".");
      } catch (NumberFormatException e) {
         return false;
      }
@@ -101,11 +95,7 @@
   // 妫?祴瀛楃涓叉槸鍚︿负涓枃瀛楃
   public static boolean isChinesrChar(String str) {
      if (str.length() < str.getBytes().length) {
         return true;
      } else {
         return false;
      }
        return str.length() < str.getBytes().length;
   }
   // 鍒ゆ柇瀛楃涓叉槸鍚︿负閭
@@ -293,24 +283,18 @@
      int i = fileName.lastIndexOf(".");
      String end = fileName.substring(i, fileName.length());
      String end = fileName.substring(i);
      return System.currentTimeMillis() + end;
   }
   public static boolean isTrimEmpty(String text) {
      if (text == null || text.trim().length() == 0) {
         return true;
      }
      return false;
        return text == null || text.trim().length() == 0;
   }
   public static boolean isNullOrEmpty(String text) {
      if (text == null || text.length() == 0 || text.equals("null")) {
         return true;
      }
      return false;
        return text == null || text.length() == 0 || text.equals("null");
   }
   public static String itrim(String beginTimeDis) {
@@ -381,7 +365,7 @@
      return m.find();
   }
   private static final char HEX_DIGITS[] = { '0', '1', '2', '3', '4', '5',
   private static final char[] HEX_DIGITS = { '0', '1', '2', '3', '4', '5',
         '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
   private static String toHexString(byte[] b) {
@@ -403,7 +387,7 @@
         MessageDigest digest = java.security.MessageDigest
               .getInstance("MD5");
         digest.update(s.getBytes());
         byte messageDigest[] = digest.digest();
         byte[] messageDigest = digest.digest();
         return toHexString(messageDigest);
      } catch (NoSuchAlgorithmException e) {
@@ -423,18 +407,15 @@
   // 判断List是否为空
   public static boolean listIsNullOrEmpty(List<String> list) {
      if (list == null || list.size() == 0)
         return true;
      else
         return false;
        return list == null || list.size() == 0;
   }
   // 获取手机型号
   public static String PeopleModel() {
      Build bd = new Build();
      String model = bd.MODEL;
      String model = Build.MODEL;
      return model;
   };
   }
   public static String PeopleDeviceId(Context context) {
      TelephonyManager tm = (TelephonyManager) context