From 5f479e70cd10a6b6d519ee5957135da9b9338dae Mon Sep 17 00:00:00 2001 From: Sebb Date: Fri, 12 Jun 2015 17:38:04 +0100 Subject: [PATCH] LANG-1059 Capitalize javadoc is incorrect --- .../org/apache/commons/lang3/StringUtils.java | 8 ++++---- .../apache/commons/lang3/text/WordUtils.java | 20 +++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index 29d709891..a927b783f 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -5738,8 +5738,8 @@ public static String lowerCase(final String str, final Locale locale) { } /** - *

Capitalizes a String changing the first letter to title case as - * per {@link Character#toTitleCase(char)}. No other letters are changed.

+ *

Capitalizes a String changing the first character to title case as + * per {@link Character#toTitleCase(char)}. No other characters are changed.

* *

For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#capitalize(String)}. * A {@code null} input String returns {@code null}.

@@ -5777,8 +5777,8 @@ public static String capitalize(final String str) { } /** - *

Uncapitalizes a String, changing the first letter to lower case as - * per {@link Character#toLowerCase(char)}. No other letters are changed.

+ *

Uncapitalizes a String, changing the first character to lower case as + * per {@link Character#toLowerCase(char)}. No other characters are changed.

* *

For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#uncapitalize(String)}. * A {@code null} input String returns {@code null}.

diff --git a/src/main/java/org/apache/commons/lang3/text/WordUtils.java b/src/main/java/org/apache/commons/lang3/text/WordUtils.java index bc4d43811..3d805c26c 100644 --- a/src/main/java/org/apache/commons/lang3/text/WordUtils.java +++ b/src/main/java/org/apache/commons/lang3/text/WordUtils.java @@ -234,7 +234,7 @@ public static String wrap(final String str, int wrapLength, String newLineStr, f //----------------------------------------------------------------------- /** *

Capitalizes all the whitespace separated words in a String. - * Only the first letter of each word is changed. To convert the + * Only the first character of each word is changed. To convert the * rest of each word to lowercase at the same time, * use {@link #capitalizeFully(String)}.

* @@ -260,7 +260,7 @@ public static String capitalize(final String str) { /** *

Capitalizes all the delimiter separated words in a String. - * Only the first letter of each word is changed. To convert the + * Only the first character of each word is changed. To convert the * rest of each word to lowercase at the same time, * use {@link #capitalizeFully(String, char[])}.

* @@ -368,7 +368,7 @@ public static String capitalizeFully(String str, final char... delimiters) { //----------------------------------------------------------------------- /** *

Uncapitalizes all the whitespace separated words in a String. - * Only the first letter of each word is changed.

+ * Only the first character of each word is changed.

* *

Whitespace is defined by {@link Character#isWhitespace(char)}. * A null input String returns null.

@@ -389,7 +389,7 @@ public static String uncapitalize(final String str) { /** *

Uncapitalizes all the whitespace separated words in a String. - * Only the first letter of each word is changed.

+ * Only the first character of each word is changed.

* *

The delimiters represent a set of characters understood to separate words. * The first string character and the first non-delimiter character after a @@ -486,10 +486,9 @@ public static String swapCase(final String str) { //----------------------------------------------------------------------- /** - *

Extracts the initial letters from each word in the String.

+ *

Extracts the initial characters from each word in the String.

* - *

The first letter of the string and all first letters after - * whitespace are returned as a new string. + *

All first characters after whitespace are returned as a new string. * Their case is not changed.

* *

Whitespace is defined by {@link Character#isWhitespace(char)}. @@ -512,10 +511,9 @@ public static String initials(final String str) { } /** - *

Extracts the initial letters from each word in the String.

+ *

Extracts the initial characters from each word in the String.

* - *

The first letter of the string and all first letters after the - * defined delimiters are returned as a new string. + *

All first characters after the defined delimiters are returned as a new string. * Their case is not changed.

* *

If the delimiters array is null, then Whitespace is used. @@ -534,7 +532,7 @@ public static String initials(final String str) { * * @param str the String to get initials from, may be null * @param delimiters set of characters to determine words, null means whitespace - * @return String of initial letters, null if null String input + * @return String of initial characters, null if null String input * @see #initials(String) * @since 2.2 */