OSDN Git Service

StringUtility
[traindelaybot/source.git] / workspace / .metadata / .plugins / org.eclipse.core.resources / .history / 12 / c06a5787ef6400111689baadc7f8b0eb
diff --git a/workspace/.metadata/.plugins/org.eclipse.core.resources/.history/12/c06a5787ef6400111689baadc7f8b0eb b/workspace/.metadata/.plugins/org.eclipse.core.resources/.history/12/c06a5787ef6400111689baadc7f8b0eb
deleted file mode 100644 (file)
index 839d433..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.yuji.em.common;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import android.content.Context;
-
-import com.yuji.em.utility.EditPrefUtil;
-
-public class CommonUtil {
-       public static String replaceString(String text, String src, String dst) {
-               return text.replaceAll(src, dst);
-       }
-
-       public static String escapeHtml(String text) {
-               StringBuffer result = new StringBuffer();
-               for (int i = 0; i < text.length(); i++) {
-                       switch (text.charAt(i)) {
-                       case '&':
-                               result.append("&amp;");
-                               break;
-                       case '<':
-                               result.append("&lt;");
-                               break;
-                       case '>':
-                               result.append("&gt;");
-                               break;
-                       default:
-                               result.append(text.charAt(i));
-                               break;
-                       }
-               }
-               return result.toString();
-       }
-
-       public static boolean isNull(String str){
-               return str == null || str.length() == 0;
-       }
-       
-       public static List<String> split(String str, String delm){
-               int l = str.length();
-               List<String> list = new ArrayList<String>();
-               
-               int pos = 0;
-               String s;
-               while (pos < l){
-                       int n = str.indexOf(delm, pos);
-                       if (n < 0){
-                               s = str.substring(pos);
-                               n = l;
-                       }
-                       else {
-                               s = str.substring(pos, n);
-                       }
-                       list.add(s);
-                       pos = n + 1;
-               }
-               
-               return list;
-       }
-       
-       public static String getUsername(Context context){
-               EditPrefUtil pref = new EditPrefUtil(context);  
-               return pref.get(Constant.PREF_USER);
-       }
-
-       public static String getPassword(Context context){
-               EditPrefUtil pref = new EditPrefUtil(context);  
-               return pref.get(Constant.PREF_PASSWORD);
-       }
-}