jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject cvs commit: jakarta-taglibs/string/src/org/apache/taglibs/string SubstringTag.java
Date Thu, 14 Feb 2002 05:21:55 GMT
bayard      02/02/13 21:21:54

  Modified:    string/src/org/apache/taglibs/string SubstringTag.java
  Log:
  Made the default start to be '0', so an end can be specified on its own.
  Stopped the default end being '-1' as the underlying implementation no longer
  uses that.
  
  Revision  Changes    Path
  1.2       +10 -6     jakarta-taglibs/string/src/org/apache/taglibs/string/SubstringTag.java
  
  Index: SubstringTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/string/src/org/apache/taglibs/string/SubstringTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SubstringTag.java	30 Aug 2001 12:34:42 -0000	1.1
  +++ SubstringTag.java	14 Feb 2002 05:21:54 -0000	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-taglibs/string/src/org/apache/taglibs/string/SubstringTag.java,v
1.1 2001/08/30 12:34:42 bayard Exp $
  - * $Revision: 1.1 $
  - * $Date: 2001/08/30 12:34:42 $
  + * $Header: /home/cvs/jakarta-taglibs/string/src/org/apache/taglibs/string/SubstringTag.java,v
1.2 2002/02/14 05:21:54 bayard Exp $
  + * $Revision: 1.2 $
  + * $Date: 2002/02/14 05:21:54 $
    *
    * ====================================================================
    *
  @@ -129,14 +129,18 @@
   
   
       public String changeString(String text) {
  -        return StringW.substring(text, start, end);
  +        if(end == null) {
  +            return StringW.substring(text, start);
  +        } else {
  +            return StringW.substring(text, start, end);
  +        }
       }
   
       public void initAttributes() {
   
  -        this.start = null;
  +        this.start = "0";
   
  -        this.end = "-1";
  +        this.end = null;
   
       }
   
  
  
  

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


Mime
View raw message