Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8200372

String::trim JavaDoc should clarify meaning of space

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 11
    • None
    • core-libs
    • None
    • b13
    • generic
    • generic

    Description

      The current JavaDoc for String::trim does not make it clear which definition of "space" is being used in the code. With additional trimming methods coming in the near future, that use a different definition of space, it makes sense to clarify String::trim's definition so that the distinction in what is a space is clear.

      String::trim uses the definition of space as any codepoint that is less than or equal to the space character codepoint (\u0040.)

      Newer trimming methods will use the definition of (white) space as any codepoint that returns true when passed to the Character::isWhitespace predicate.

      Attachments

        Issue Links

          Activity

            People

              jlaskey Jim Laskey
              jlaskey Jim Laskey
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: