5

Questions like this discuss the limitations to the logic used by the String::trim method. Some libraries such as Guava offer alternatives.

I vaguely recall that a recent version of Java (8, 9, 10) shipped with an alternative, a more modern Unicode-savvy approach to defining and removing whitespace characters from text.

Is there such a facility bundled with Java now?

Raj
  • 22,346
  • 14
  • 99
  • 142
Basil Bourque
  • 303,325
  • 100
  • 852
  • 1,154

0 Answers0