brianchandotcom/liferay-portal — pull request #8741 by shuyangzhou (2013-01-30 07:36:41+00:00)
Title: LPS-32678

@brianchandotcom @hhuijser

I rewrote all those trim*() methods.

Right now the trim with exceptions fall back to the simple trim, not the other way around.
Since the simple trim are used much more often than those exception ones, we should convert complex case to simple case on special condition, rather than generalize the simple case to complex case to reduce duplicate code.

For utility class like this, we should spend more man power to do it right once(duplicate code is not a problem, as they should be very stable, very unlikely to be changed in the future), then everyone else can use it with a good performance.