svn commit: r643174 - /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: r643174 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java

jleroux@apache.org
Author: jleroux
Date: Mon Mar 31 15:10:06 2008
New Revision: 643174

URL: http://svn.apache.org/viewvc?rev=643174&view=rev
Log:
A change needed for WASCE tool

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

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java?rev=643174&r1=643173&r2=643174&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/StringUtil.java Mon Mar 31 15:10:06 2008
@@ -403,7 +403,7 @@
      * @param regex
      * Removes all matches of regex from a str
      */
-    private static String removeRegex(String str, String regex) {
+    public static String removeRegex(String str, String regex) {
         Pattern pattern = Pattern.compile(regex);
         Matcher matcher = pattern.matcher(str);
         return matcher.replaceAll("");
@@ -415,10 +415,10 @@
      * @return
      */
     public static String addToNumberString(String numberString, long addAmount) {
- if (numberString == null) return null;
-
- int origLength = numberString.length();
- long number = Long.parseLong(numberString);
+    if (numberString == null) return null;
+    
+    int origLength = numberString.length();
+    long number = Long.parseLong(numberString);
         return padNumberString(Long.toString(number + addAmount), origLength);
     }