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/lang/src/java/org/apache/commons/lang WordUtils.java
Date Fri, 04 Jun 2004 03:58:27 GMT
bayard      2004/06/03 20:58:27

  Modified:    lang/src/java/org/apache/commons/lang WordUtils.java
  Log:
  improved javadoc, and missing javadoc for new uncapitalize method added.
  
  Revision  Changes    Path
  1.13      +33 -3     jakarta-commons/lang/src/java/org/apache/commons/lang/WordUtils.java
  
  Index: WordUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/WordUtils.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- WordUtils.java	3 Jun 2004 03:49:47 -0000	1.12
  +++ WordUtils.java	4 Jun 2004 03:58:27 -0000	1.13
  @@ -246,6 +246,10 @@
        * Only the first letter of each word is changed. To change all letters to
        * the capitalized case, use {@link #capitalizeFully(String)}.</p>
        *
  +     * <p>The delimiters represent a set of characters understood to separate words.
  +     * The first string character and the first non-delimiter character after a
  +     * delimiter will be capitalized. </p>
  +     *
        * <p>A <code>null</code> input String returns <code>null</code>.
        * Capitalization uses the unicode title case, normally equivalent to
        * upper case.</p>
  @@ -257,7 +261,7 @@
        * </pre>
        * 
        * @param str  the String to capitalize, may be null
  -     * @param delimiters  characters to capitalize afterwards
  +     * @param delimiters  set of characters to determine capitalization
        * @return capitalized String, <code>null</code> if null String input
        * @see #uncapitalize(String)
        * @see #capitalizeFully(String)
  @@ -329,6 +333,10 @@
        * <p>Capitalizes all the delimiter separated words in a String.
        * All letters are changed, so the resulting string will be fully changed.</p>
        *
  +     * <p>The delimiters represent a set of characters understood to separate words.
  +     * The first string character and the first non-delimiter character after a
  +     * delimiter will be capitalized. </p>
  +     *
        * <p>A <code>null</code> input String returns <code>null</code>.
        * Capitalization uses the unicode title case, normally equivalent to
        * upper case.</p>
  @@ -340,7 +348,7 @@
        * </pre>
        * 
        * @param str  the String to capitalize, may be null
  -     * @param delimiters  characters to capitalize afterwards
  +     * @param delimiters  set of characters to determine capitalization
        * @return capitalized String, <code>null</code> if null String input
        */
       public static String capitalizeFully(String str, char[] delimiters) {
  @@ -372,6 +380,28 @@
           return uncapitalize(str, null);
       }
   
  +    /**
  +     * <p>Uncapitalizes all the whitespace separated words in a String.
  +     * Only the first letter of each word is changed.</p>
  +     *
  +     * <p>The delimiters represent a set of characters understood to separate words.
  +     * The first string character and the first non-delimiter character after a
  +     * delimiter will be uncapitalized. </p>
  +     *
  +     * <p>Whitespace is defined by {@link Character#isWhitespace(char)}.
  +     * A <code>null</code> input String returns <code>null</code>.</p>
  +     *
  +     * <pre>
  +     * WordUtils.uncapitalize(null)        = null
  +     * WordUtils.uncapitalize("")          = ""
  +     * WordUtils.uncapitalize("I Am FINE") = "i am fINE"
  +     * </pre>
  +     * 
  +     * @param str  the String to uncapitalize, may be null
  +     * @param delimiters  set of characters to determine uncapitalization
  +     * @return uncapitalized String, <code>null</code> if null String input
  +     * @see #capitalize(String)
  +     */
       public static String uncapitalize(String str, char[] delimiters) {
           if (str == null || str.length() == 0) {
               return str;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message