What is a good alternative of JavaScript ltrim() and rtrim() functions in Java?
ltrim()
rtrim()
Guava has CharMatcher trimLeadingFrom and trimTrailingFrom
e.g. CharMatcher.whitespace.trimTrailingFrom(s)
CharMatcher.whitespace.trimTrailingFrom(s)