commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang Strings.java
Date Thu, 20 Jun 2002 03:20:28 GMT
bayard      2002/06/19 20:20:28

  Modified:    lang/src/java/org/apache/commons/lang Strings.java
  Log:
  Removed a handful of methods which took overloaded String values for integers.
  Allowing such code as: Strings.repeat("5") which called on to Strings.repeat(5).
  
  Revision  Changes    Path
  1.6       +1 -36     jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang/Strings.java
  
  Index: Strings.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/lang/src/java/org/apache/commons/lang/Strings.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Strings.java	19 Jun 2002 03:04:19 -0000	1.5
  +++ Strings.java	20 Jun 2002 03:20:28 -0000	1.6
  @@ -496,15 +496,6 @@
       }
   
       /**
  -     * @see #replace(String text, String repl, String with, int max)
  -     */
  -    public static String replace(String text, String repl, String with,
  -                                 String max)
  -    {
  -        return replace(text, repl, with, Numbers.stringToInt(max, -1));
  -    }
  -
  -    /**
        * Replace a string with another string inside a larger string,
        * for the first <code>max</code> values of the search string.  A
        * <code>null</code> reference is passed to this method is a
  @@ -543,9 +534,6 @@
           return buf.toString();
       }
   
  -    static public String overlayString(String text, String overlay, String start, String
end) {
  -        return overlayString(text,overlay,Numbers.stringToInt(start), Numbers.stringToInt(end));
  -    }
       /**
        * Overlay a part of a string with another string.
        *
  @@ -562,10 +550,6 @@
           return pre+overlay+post;
       }
   
  -    static public String repeat(String str, String n) {
  -        return repeat(str, Numbers.stringToInt(n,1));
  -    }
  -
       /**
        * Repeat a string n times to form a new string.
        *
  @@ -602,10 +586,6 @@
           return center(str, n, " ");
       }
   
  -    static public String center(String str, String n, String delim) {
  -        return center(str,Numbers.stringToInt(n), delim);
  -    }
  -
       /**
        * Center a string in a larger string of size n.
        * Uses a supplied String as the value to buffer the string with..
  @@ -992,9 +972,6 @@
       static public String rightPad(String str, int n) {
           return rightPad(str, n, " ");
       }
  -    static public String rightPad(String str, String n, String delim) {
  -        return rightPad(str, Numbers.stringToInt(n), delim);
  -    }
       /**
        * Right pad a String with a specified string. Pad to a size of n.
        *
  @@ -1016,9 +993,6 @@
       static public String leftPad(String str, int n) {
           return leftPad(str, n, " ");
       }
  -    static public String leftPad(String str, String n, String delim) {
  -        return leftPad(str, Numbers.stringToInt(n), delim);
  -    }
       /**
        * Left pad a String with a specified string. Pad to a size of n.
        *
  @@ -1346,9 +1320,6 @@
       static public String wordWrap(String str, int width) {
           return wordWrap(str, width, "\n", "-");
       }
  -    static public String wordWrap(String str, String width, String delim, String split)
{
  -        return wordWrap(str, Numbers.stringToInt(width), delim, split);
  -    }
       /**
        * Word-wrap a string.
        *
  @@ -1642,9 +1613,6 @@
           return str.toLowerCase();
       }
   
  -    static public String substring(String str, String start) {
  -        return substring(str, Numbers.stringToInt(start));
  -    }
       static public String substring(String str, int start) {
           if(str == null) {
               return null;
  @@ -1660,9 +1628,6 @@
           }
   
           return str.substring(start);
  -    }
  -    static public String substring(String str, String start, String end) {
  -        return substring(str, Numbers.stringToInt(start), Numbers.stringToInt(end));
       }
       static public String substring(String str, int start, int end) {
           if(str == null) {
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message