svn commit: r429337 - /incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r429337 - /incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java

jacopoc
Author: jacopoc
Date: Mon Aug  7 06:26:07 2006
New Revision: 429337

URL: http://svn.apache.org/viewvc?rev=429337&view=rev
Log:
tabs to spaces

Modified:
    incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java

Modified: incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java?rev=429337&r1=429336&r2=429337&view=diff
==============================================================================
--- incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java (original)
+++ incubator/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java Mon Aug  7 06:26:07 2006
@@ -262,10 +262,10 @@
     
     /** Removes all spaces from a string */
     public static String removeSpaces(String str) {
-     return removeRegex(str,"[\\ ]");
+        return removeRegex(str,"[\\ ]");
     }
 
- public static String toHexString(byte[] bytes) {
+    public static String toHexString(byte[] bytes) {
         StringBuffer buf = new StringBuffer(bytes.length * 2);
         for (int i = 0; i < bytes.length; i++) {
             buf.append(hexChar[(bytes[i] & 0xf0) >>> 4]);
@@ -326,24 +326,24 @@
         return digestChars;
     }
 
- /** Removes all non-numbers from str */
- public static String removeNonNumeric(String str) {
- return removeRegex(str,"[\\D]");
- }
+    /** Removes all non-numbers from str */
+    public static String removeNonNumeric(String str) {
+        return removeRegex(str,"[\\D]");
+    }
     
- /** Removes all numbers from str */
- public static String removeNumeric(String str) {
- return removeRegex(str,"[\\d]");
- }
+    /** Removes all numbers from str */
+    public static String removeNumeric(String str) {
+        return removeRegex(str,"[\\d]");
+    }
 
     /**
- * @param str
- * @param regex
- * Removes all matches of regex from a str
- */
- private static String removeRegex(String str, String regex) {
- Pattern pattern = Pattern.compile(regex);
-     Matcher matcher = pattern.matcher(str);
- return matcher.replaceAll("");
- }
+     * @param str
+     * @param regex
+     * Removes all matches of regex from a str
+     */
+    private static String removeRegex(String str, String regex) {
+        Pattern pattern = Pattern.compile(regex);
+        Matcher matcher = pattern.matcher(str);
+        return matcher.replaceAll("");
+    }
 }