1. 20 6月, 2021 1 次提交
  2. 10 5月, 2021 1 次提交
    • Added 4 useful methods · ebc64cd3
      马歇尔 提交于
      /**
           * Returns the domain part of a given Email address
           *
           * @param email The Email address. E.g Returns "protonmail.com" from the given Email "johnsmith@protonmail.com".
           * @return the domain part of a given Email address.
           */
          public static String extractEmailProvider(String email) {
              return email.substring(email.lastIndexOf("@") + 1);
          }
      
          /**
           * Returns the username part of a given Email address. E.g. Returns "johnsmith" from the given Email "johnsmith@protonmail.com".
           *
           * @param email The Email address.
           * @return the username part of a given Email address.
           */
          public static String extractEmailUsername(String email) {
              return email.substring(0, email.lastIndexOf("@"));
          }
      
      
          /**
           * Return whether a given Email address is on a specified Email provider. E.g. "johnsmith@protonmail.com" and "gmail.com" will return false.
           *
           * @param email The Email address.
           * @param emailProvider The Email provider to testify against.
           * @return {@code true}: yes<br>{@code false}: no
           */
          public static boolean isFromEmailProvider(String email, String emailProvider) {
              return extractEmailProvider(email).equalsIgnoreCase(emailProvider);
          }
      
          /**
           * Return whether a given Email address is on any of the specified Email providers list (array). E.g. Useful if you pass it a list of real Email provider services and check if the Email is a disposable Email or a real one.
           *
           * @param email The Email address.
           * @param emailProviders The list of Email providers to testify against.
           * @return {@code true}: yes<br>{@code false}: no
           */
          public static boolean isFromAnyOfEmailProviders(String email, String[] emailProviders) {
              return com.blankj.utilcode.util.ArrayUtils.contains(emailProviders, extractEmailProvider(email));
          }
      ebc64cd3
  3. 22 2月, 2021 3 次提交
  4. 01 2月, 2021 2 次提交
  5. 10 1月, 2021 1 次提交
    • Added new methods (features) · 7402e364
      马歇尔 提交于
      Added 6 new very useful methods.
      1. getScreenXDpi() which returns the Width (X) density in DPI.
      2. getScreenYDpi() which returns the Height (Y) density in DPI.
      3. calculateDistanceByX() which returns the distance between the given View's X (start point of View's width) and the screen width.
      4. calculateDistanceByY() which returns the distance between the given View's Y (start point of View's height) and the screen height.
      5. getViewX() which returns the X coordinate of the given View on the screen.
      6. getViewY() which returns the Y coordinate of the given View on the screen.
      7402e364
  6. 04 12月, 2020 2 次提交
  7. 13 11月, 2020 1 次提交
  8. 06 11月, 2020 1 次提交
  9. 29 10月, 2020 1 次提交
  10. 28 10月, 2020 1 次提交
  11. 27 10月, 2020 1 次提交
  12. 26 10月, 2020 2 次提交
  13. 25 10月, 2020 2 次提交
  14. 12 10月, 2020 3 次提交
  15. 08 9月, 2020 4 次提交
  16. 05 9月, 2020 1 次提交
  17. 01 9月, 2020 1 次提交
  18. 17 8月, 2020 1 次提交
  19. 12 8月, 2020 1 次提交
  20. 11 8月, 2020 2 次提交
  21. 28 5月, 2020 1 次提交
  22. 25 5月, 2020 1 次提交
  23. 21 5月, 2020 1 次提交
  24. 07 5月, 2020 1 次提交
  25. 05 5月, 2020 2 次提交
  26. 03 5月, 2020 1 次提交
  27. 29 4月, 2020 1 次提交