]> Dogcows Code - chaz/vimcoder/commitdiff
rename quote method to escape
authorCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 13 Jul 2011 18:21:20 +0000 (12:21 -0600)
committerCharles McGarvey <chazmcgarvey@brokenzipper.com>
Wed, 13 Jul 2011 18:21:20 +0000 (12:21 -0600)
src/com/dogcows/Util.java

index 3253ae223c5515457949c2012fb6c658be05d5c9..412ef4a95b2e24258ec137777cb7bbfe3e058048 100644 (file)
@@ -61,12 +61,12 @@ public abstract class Util
        }
 
        /**
-        * Quote a string by replacing prepending backslashes and double
+        * Escape a string by replacing prepending backslashes and double
         * quotation characters with an extra backslash.
-        * @param The string to be quoted.
-        * @return The quoted string.
+        * @param The string to be escaped.
+        * @return The escaped string.
         */
-       public static String quote(String a)
+       public static String escape(String a)
        {
                a = a.replaceAll("\\\\", "\\\\\\\\");
                a = a.replaceAll("\"",   "\\\\\\\"");
@@ -151,8 +151,7 @@ public abstract class Util
                String text = template;
                for (String key : terms.keySet())
                {
-                       text = text.replaceAll("\\$" + key + "\\$",
-                                                                  Util.quote(terms.get(key)));
+                       text = text.replaceAll("\\$" + key + "\\$", Util.escape(terms.get(key)));
                }
                return text;
        }
This page took 0.030579 seconds and 4 git commands to generate.