merged 1.1 branch into head
[mir.git] / source / mir / util / StringRoutines.java
index a7a41b6..6757bdf 100755 (executable)
@@ -31,8 +31,8 @@ package mir.util;
 
 import gnu.regexp.RE;
 
-import java.util.List;
 import java.util.ArrayList;
+import java.util.List;
 
 public class StringRoutines {
 
@@ -169,32 +169,6 @@ public class StringRoutines {
     }
   }
 
-  public static String performCaseInsensitiveRegularExpressionReplacement(String aSource, String aSearchExpression, String aReplacement) {
-    try {
-      RE regularExpression;
-
-      regularExpression = new RE(aSearchExpression, RE.REG_ICASE);
-
-      return regularExpression.substituteAll(aSource, aReplacement);
-    }
-    catch (Throwable t) {
-      throw new UtilFailure("StringRoutines.performRegularExpressionReplacement: " + t.toString(), t);
-    }
-  }
-
-  public static boolean performRegularExpressionSearch(String aSource, String aSearchExpression) {
-    try {
-      RE regularExpression;
-
-      regularExpression = new RE(aSearchExpression);
-
-      return regularExpression.isMatch(aSource);
-    }
-    catch (Throwable t) {
-      throw new UtilFailure("StringRoutines.performRegularExpressionSearch: " + t.toString(), t);
-    }
-  }
-
   /**
    * Separates a string based on a separator:
    *     <code>seperateString("a:b:c", ":");</code> will lead to
@@ -316,8 +290,7 @@ public class StringRoutines {
   public static String padStringLeft(String aString, int aLength, char aPadCharacter) {
     if (aString.length()<aLength)
       return replicateChar(aPadCharacter, aLength-aString.length()) + aString;
-    else
-      return aString;
+               return aString;
   }
 
   private static final char HEX_CHARACTERS[] = {