commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Yu <j...@scioworks.com>
Subject Re: [lang][patch] StringUtils [Was: Re: [lang] Code donation: StringTokenUtils]
Date Fri, 30 Aug 2002 01:53:52 GMT
Hi Daniel,

How unmindful I am! How could I assume that my copy of the 20020822 build 
was the CVS HEAD???
Ok, here you go.

========= Diff starts here ============================================

--- StringUtils_orig1.java      Fri Aug 30 09:44:10 2002
+++ StringUtils.java    Fri Aug 30 09:46:54 2002
@@ -408,11 +408,16 @@
      /**
       * 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.
+     * A null separator will cause parsing to be on whitespace.<p>
+     *
+     * This is useful for quickly tokenizing a string directly into
+     * an array of tokens, instead of an enumeration of tokens
+     * as what StringTokenizer does.
       *
       * @param str  the string to parse
-     * @param separator  The separator character. If <code>null</code>, splits
-     *  on whitespace.
+     * @param separator  Characters used as the delimiters.
+     *                   If <code>null</code>, splits
+     *                   on whitespace.
       * @return an array of parsed Strings
       */
      public static String[] split(String text, String separator) {
@@ -423,11 +428,16 @@
       * Splits the provided text into a list, based on a given separator.
       * The separator is not included in the returned String array.
       * The maximum number of splits to perfom can be controlled.
-     * A null separator will cause parsing to be on whitespace.
+     * A null separator will cause parsing to be on whitespace.<p>
+     *
+     * This is useful for quickly tokenizing a string directly into
+     * an array of tokens, instead of an enumeration of tokens
+     * as what StringTokenizer does.
       *
       * @param str  the string to parse
-     * @param separator  The separator character. If <code>null</code>, splits
-     *  on whitespace.
+     * @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

========= Diff ends here ==============================================


At 01:35 am 30-08-2002, you wrote:
>The changes look good, but your patch doesn't apply.  Mind giving it a
>go against CVS HEAD?
>
>John Yu <john@scioworks.com> writes:
>
> > Daniel,
> >
> > I've re-read the javadoc. It's already pretty comprehensive.
> > Nevertheless, I've made some small changes to add clarification.
> >
> >   <snipped/>
> >
> >
> > At 03:04 am 28-08-2002, you wrote:
> > >John Yu <john@scioworks.com> writes:
> > >
> > > > Steven,
> > > >
> > > > Doh! I overlooked them.
> > > > You're right. The split() and join() do the work.
> > >
> > >John, can you think of anything to add to the JavaDoc to aid people in
> > >finding/identifying those methods in the future?
> > >--
> > >
> > >Daniel Rall <dlr@finemaltcoding.com>
> >

-- 
John Yu                       Scioworks Technologies
e: john@scioworks.com         w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Don't develop Struts Apps without it!"


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