mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-08 02:58:33 +00:00
Corrected Javadoc (mentioned in LANG-1058), added examples to unit test.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1672988 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
71f6746f81
commit
5aa87b52f1
@ -5728,7 +5728,7 @@ public static String capitalize(final String str) {
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Uncapitalizes a String changing the first letter to title case as
|
||||
* <p>Uncapitalizes a String, changing the first letter to lower case as
|
||||
* per {@link Character#toLowerCase(char)}. No other letters are changed.</p>
|
||||
*
|
||||
* <p>For a word based algorithm, see {@link org.apache.commons.lang3.text.WordUtils#uncapitalize(String)}.
|
||||
@ -5737,6 +5737,7 @@ public static String capitalize(final String str) {
|
||||
* <pre>
|
||||
* StringUtils.uncapitalize(null) = null
|
||||
* StringUtils.uncapitalize("") = ""
|
||||
* StringUtils.uncapitalize("cat") = "cat"
|
||||
* StringUtils.uncapitalize("Cat") = "cat"
|
||||
* StringUtils.uncapitalize("CAT") = "cAT"
|
||||
* </pre>
|
||||
|
@ -267,6 +267,11 @@ public void testCaseFunctions() {
|
||||
"foo test thing", StringUtils.lowerCase("fOo test THING", Locale.ENGLISH) );
|
||||
assertEquals("lowerCase(empty-string, Locale) failed",
|
||||
"", StringUtils.lowerCase("", Locale.ENGLISH) );
|
||||
|
||||
// Examples from uncapitalize Javadoc
|
||||
assertEquals("cat", StringUtils.uncapitalize("cat"));
|
||||
assertEquals("cat", StringUtils.uncapitalize("Cat"));
|
||||
assertEquals("cAT", StringUtils.uncapitalize("CAT"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Loading…
x
Reference in New Issue
Block a user