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/util/src/java/org/apache/commons/util WordWrapper.java XmlUtils.java
Date Tue, 16 Jul 2002 14:49:09 GMT
bayard      2002/07/16 07:49:09

  Modified:    util/src/java/org/apache/commons/util WordWrapper.java
                        XmlUtils.java
  Log:
  Changed Strings to StringUtils.
  
  Revision  Changes    Path
  1.3       +3 -3      jakarta-commons-sandbox/util/src/java/org/apache/commons/util/WordWrapper.java
  
  Index: WordWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/util/src/java/org/apache/commons/util/WordWrapper.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WordWrapper.java	14 Jul 2002 02:43:30 -0000	1.2
  +++ WordWrapper.java	16 Jul 2002 14:49:09 -0000	1.3
  @@ -3,7 +3,7 @@
   import java.util.StringTokenizer;
   import java.util.NoSuchElementException;
   
  -import org.apache.commons.lang.Strings;
  +import org.apache.commons.lang.StringUtils;
   
   /* ====================================================================
    * The Apache Software License, Version 1.1
  @@ -284,9 +284,9 @@
                   */
                       // insert spaces
                       buffer.append(substr.substring(0,idx));
  -                    buffer.append(Strings.repeat(" ",width-idx));
  +                    buffer.append(StringUtils.repeat(" ",width-idx));
   //                    System.err.print(substr.substring(0,idx));
  -//                    System.err.print(Strings.repeat(" ",width-idx));
  +//                    System.err.print(StringUtils.repeat(" ",width-idx));
                       buffer.append(delim);
   //                    System.err.print(delim);
   //                    System.err.println("i -= "+width+"-"+idx);
  
  
  
  1.4       +7 -7      jakarta-commons-sandbox/util/src/java/org/apache/commons/util/XmlUtils.java
  
  Index: XmlUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/util/src/java/org/apache/commons/util/XmlUtils.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- XmlUtils.java	25 Feb 2002 18:47:25 -0000	1.3
  +++ XmlUtils.java	16 Jul 2002 14:49:09 -0000	1.4
  @@ -54,7 +54,7 @@
    * <http://www.apache.org/>.
    */
   
  -import org.apache.commons.lang.Strings;
  +import org.apache.commons.lang.StringUtils;
   
   /**
    * XML helping static methods.
  @@ -65,9 +65,9 @@
   final public class XmlUtils {
   
       static public String escapeXml(String str) {
  -        str = Strings.replace(str,"&","&amp;");
  -        str = Strings.replace(str,"<","&lt;");
  -        str = Strings.replace(str,">","&gt;");
  +        str = StringUtils.replace(str,"&","&amp;");
  +        str = StringUtils.replace(str,"<","&lt;");
  +        str = StringUtils.replace(str,">","&gt;");
           return str;
       }
   
  @@ -110,7 +110,7 @@
           if(nextCloseIdx == -1) {
               return -1;
           }
  -        int count = Strings.countMatches(text.substring(start, nextCloseIdx), open);
  +        int count = StringUtils.countMatches(text.substring(start, nextCloseIdx), open);
           if(count == 0) {
               return -1;  // tag is never opened
           }
  @@ -120,7 +120,7 @@
               if(nextCloseIdx == -1) {
                   return -1;
               }
  -            count = Strings.countMatches(text.substring(start, nextCloseIdx), open);
  +            count = StringUtils.countMatches(text.substring(start, nextCloseIdx), open);
               expected++;
           }
           return nextCloseIdx;
  
  
  

--
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