commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang StringUtils.java
Date Fri, 30 Aug 2002 02:52:54 GMT
dlr         2002/08/29 19:52:54

  Modified:    lang/src/java/org/apache/commons/lang StringUtils.java
  Log:
  split(String, String, int): Integrated some good suggested
  improvements from John Yu <john@scioworks.com>.
  
  split(String, String): Referenced split(String, String, int) to avoid
  maintainence overhead of duplicated JavaDoc.
  
  Revision  Changes    Path
  1.8       +11 -14    jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java
  
  Index: StringUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/StringUtils.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- StringUtils.java	23 Aug 2002 08:00:26 -0000	1.7
  +++ StringUtils.java	30 Aug 2002 02:52:54 -0000	1.8
  @@ -406,14 +406,7 @@
       }
   
       /**
  -     * Splits the provided text into a list, based on a given separator.
  -     * The separator is not included in the returned String array.
  -     * A null separator will cause parsing to be on whitespace.
  -     *
  -     * @param str  the string to parse
  -     * @param separator  The separator character. If <code>null</code>, splits
  -     *  on whitespace.
  -     * @return an array of parsed Strings 
  +     * @see #split(String, String, int)
        */
       public static String[] split(String text, String separator) {
           return split(text, separator, -1);
  @@ -425,11 +418,15 @@
        * The maximum number of splits to perfom can be controlled.
        * A null separator will cause parsing to be on whitespace.
        *
  -     * @param str  the string to parse
  -     * @param separator  The separator character. If <code>null</code>, splits
  -     *  on whitespace.
  -     * @param max  The maximum number of elements to include in the
  -     *  list.  A zero or negative value implies no limit.
  +     * <p>This is useful for quickly splitting a string directly into
  +     * an array of tokens, instead of an enumeration of tokens (as
  +     * <code>StringTokenizer</code> does).
  +     *
  +     * @param str The string to parse.
  +     * @param separator Characters used as the delimiters. If
  +     * <code>null</code>, splits on whitespace.
  +     * @param max The maximum number of elements to include in the
  +     * list.  A zero or negative value implies no limit.
        * @return an array of parsed Strings 
        */
       public static String[] split(String text, String separator, int max) {
  
  
  

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