Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1059

Capitalize javadoc is incorrect

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.3.2
    • 3.5
    • lang.*
    • None

    Description

      The below also applies to uncapitalize.

      Currently the javadocs say:

      Capitalizes a String changing the first letter to title case as per Character.toTitleCase(char). No other letters are changed.

      A more accurate description would be:

      Capitalizes a String changing the first character to title case as per Character.toTitleCase(char). No other letters are changed.

      capitalize("'word'") is an example where the current docs are false (note single-quote is first character but not first letter and nothing gets capitalized)

      This may in fact be a bug if the current docs are correct.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Fastpaws Colin Casey
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: