How to trim ending blanks of a string?

Viewed 6743

In java, I can do it with commons-lang:

StringUtils.stripEnd("  abc  \t", null) // => "  abc"

I want to know if there is any built-in method to do this in scala, or how to do it in scala without any 3rd-party dependencies?

3 Answers
Related