commons-dev mailing list archives

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

I've re-read the javadoc. It's already pretty comprehensive.
Nevertheless, I've made some small changes to add clarification.

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

--- StringUtils_orig.java       Wed Aug 28 14:07:47 2002
+++ StringUtils.java    Wed Aug 28 14:05:06 2002
@@ -405,11 +405,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) {
@@ -422,9 +427,14 @@
       * The maximum number of splits to perfom can be controlled.
       * A null separator will cause parsing to be on whitespace.
       *
+     * 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 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!"
Mime
View raw message