The trim() method uses an unusual and dated definition of spaces to trim, whereas the strip() family of methods on String uses the modern, Unicode-based definition of whitespace.
There should be a note in the trim() method specification that refers people to the strip() family of methods. The lack of such a note may lead to bugs such asJDK-8328175 which requests methods that already exit.
There should be a note in the trim() method specification that refers people to the strip() family of methods. The lack of such a note may lead to bugs such as