OSDN Git Service

Remove obsolete class
authorRandy Baumgarte <randy@fbn.cx>
Tue, 11 Oct 2011 11:52:09 +0000 (07:52 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Tue, 11 Oct 2011 11:52:09 +0000 (07:52 -0400)
src/cx/fbn/nevernote/utilities/StringUtils.java [deleted file]

diff --git a/src/cx/fbn/nevernote/utilities/StringUtils.java b/src/cx/fbn/nevernote/utilities/StringUtils.java
deleted file mode 100644 (file)
index 4d0d2c9..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*\r
- * This file is part of NixNote \r
- * Copyright 2009 Randy Baumgarte\r
- * \r
- * This file may be licensed under the terms of of the\r
- * GNU General Public License Version 2 (the ``GPL'').\r
- *\r
- * Software distributed under the License is distributed\r
- * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either\r
- * express or implied. See the GPL for the specific language\r
- * governing rights and limitations.\r
- *\r
- * You should have received a copy of the GPL along with this\r
- * program. If not, go to http://www.gnu.org/licenses/gpl.html\r
- * or write to the Free Software Foundation, Inc.,\r
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\r
- *\r
-*/\r
-\r
-package cx.fbn.nevernote.utilities;\r
-\r
-import java.util.HashMap;\r
-\r
-public class StringUtils {\r
-\r
-         private StringUtils() {}\r
-         \r
-         private static HashMap<String,String> htmlEntities;\r
-         static {\r
-           htmlEntities = new HashMap<String,String>();\r
-           htmlEntities.put("&lt;","<")    ; htmlEntities.put("&gt;",">");\r
-           htmlEntities.put("&amp;","&")   ; htmlEntities.put("&quot;","\"");\r
-           htmlEntities.put("&agrave;","à"); htmlEntities.put("&agrave;","À");\r
-           htmlEntities.put("&acirc;","â") ; htmlEntities.put("&auml;","ä");\r
-           htmlEntities.put("&auml;","Ä")  ; htmlEntities.put("&acirc;","Â");\r
-           htmlEntities.put("&aring;","å") ; htmlEntities.put("&aring;","Å");\r
-           htmlEntities.put("&aelig;","æ") ; htmlEntities.put("&aElig;","Æ" );\r
-           htmlEntities.put("&ccedil;","ç"); htmlEntities.put("&ccedil;","Ç");\r
-           htmlEntities.put("&eacute;","é"); htmlEntities.put("&eacute;","É" );\r
-           htmlEntities.put("&egrave;","è"); htmlEntities.put("&egrave;","È");\r
-           htmlEntities.put("&ecirc;","ê") ; htmlEntities.put("&ecirc;","Ê");\r
-           htmlEntities.put("&euml;","ë")  ; htmlEntities.put("&euml;","Ë");\r
-           htmlEntities.put("&iuml;","ï")  ; htmlEntities.put("&iuml;","Ï");\r
-           htmlEntities.put("&ocirc;","ô") ; htmlEntities.put("&ocirc;","Ô");\r
-           htmlEntities.put("&ouml;","ö")  ; htmlEntities.put("&ouml;","Ö");\r
-           htmlEntities.put("&oslash;","ø") ; htmlEntities.put("&oslash;","Ø");\r
-           htmlEntities.put("&szlig;","ß") ; htmlEntities.put("&ugrave;","ù");\r
-           htmlEntities.put("&ugrave;","Ù"); htmlEntities.put("&ucirc;","û");\r
-           htmlEntities.put("&ucirc;","Û") ; htmlEntities.put("&uuml;","ü");\r
-           htmlEntities.put("&uuml;","Ü")  ; htmlEntities.put("&nbsp;"," ");\r
-           htmlEntities.put("&copy;","\u00a9"); htmlEntities.put("&apos;", "'");\r
-           htmlEntities.put("&reg;","\u00ae"); htmlEntities.put("&iexcl;", "\u00a1");\r
-           htmlEntities.put("&euro;","\u20a0"); htmlEntities.put("&cent;", "\u00a2");\r
-           htmlEntities.put("&pound;", "\u00a3"); htmlEntities.put("&curen;", "\u00a4");\r
-           htmlEntities.put("&yen;", "\u00a5"); htmlEntities.put("&brvbar;", "\u00a6");\r
-           htmlEntities.put("&sect;", "\u00a7"); htmlEntities.put("&uml;", "\u00a8");\r
-           htmlEntities.put("&copy;", "\u00a9"); htmlEntities.put("&ordf;", "\u00aa");\r
-           htmlEntities.put("&laqo;", "\u00ab"); htmlEntities.put("&not;", "\u00ac");\r
-           htmlEntities.put("&reg;", "\u00ae"); htmlEntities.put("&macr;", "\u00af");\r
-         }\r
-\r
-\r
-         \r
-         public static final String unescapeHTML(String source, int start){\r
-                    int i,j;\r
-\r
-                    i = source.indexOf("&", start);\r
-                    while (i>-1) {\r
-                       j = source.indexOf(";" ,i);\r
-                       if (j > i) {\r
-                          String entityToLookFor = source.substring(i , j + 1);\r
-                          String value = htmlEntities.get(entityToLookFor);\r
-                          if (value != null) {\r
-                                  value = " ";\r
-                                  source = new StringBuffer().append(source.substring(0 , i).toLowerCase())\r
-                                          .append(value)\r
-                                          .append(source.substring(j + 1))\r
-                                          .toString();\r
-                                  i = source.indexOf("&", i+1);\r
-                          }\r
-                       }\r
-                    }\r
-                    return source;\r
-                 }\r
-\r
-         \r
-         public static final String unescapeHTML2(String source, int start){\r
-            int i,j;\r
-\r
-            i = source.indexOf("&", start);\r
-            if (i > -1) {\r
-               j = source.indexOf(";" ,i);\r
-               if (j > i) {\r
-                  String entityToLookFor = source.substring(i , j + 1);\r
-                  String value = htmlEntities.get(entityToLookFor);\r
-                  if (value != null) {\r
-                          value = " ";\r
-                          source = new StringBuffer().append(source.substring(0 , i).toLowerCase())\r
-                                   .append(value)\r
-                                   .append(source.substring(j + 1))\r
-                                   .toString();\r
-                return unescapeHTML(source, i + 1); // recursive call\r
-                  }\r
-               }\r
-            }\r
-            return source;\r
-         }\r
-}\r