]> git.ktnx.net Git - mobile-ledger.git/blobdiff - app/src/main/java/net/ktnx/mobileledger/utils/Misc.java
replace local utility functions with ones from TextUtils
[mobile-ledger.git] / app / src / main / java / net / ktnx / mobileledger / utils / Misc.java
index b912541fcd351f20d92b948c846ab481cb289d14..a79bcf93abee7c4845ea2c288a43d3e983ca9b19 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright © 2019 Damyan Ivanov.
+ * Copyright © 2020 Damyan Ivanov.
  * This file is part of MoLe.
  * MoLe is free software: you can distribute it and/or modify it
  * under the term of the GNU General Public License as published by
@@ -63,21 +63,12 @@ public class Misc {
     public static String nullIsEmpty(String str) {
         return (str == null) ? "" : str;
     }
-    public static boolean isEmptyOrNull (String str) {
-        if (str == null) return true;
-        return str.isEmpty();
-    }
     public static boolean equalStrings(String u, CharSequence text) {
         return nullIsEmpty(u).equals(text.toString());
     }
     public static boolean equalStrings(String a, String b) {
         return nullIsEmpty(a).equals(nullIsEmpty(b));
     }
-    public static boolean isEmptyOrNull(CharSequence text) {
-        if (text == null)
-            return true;
-        return text.length() == 0;
-    }
     public static String trim(@Nullable String string) {
         if (string == null)
             return null;