Closed GoogleCodeExporter closed 9 years ago
This function implements an "old-school" definition of whitespace as described
here: http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/String.html#trim()
There are lots of Unicode whitespace characters (em-space, en-space, thin
space, nbsp, etc) which aren't included.
Original comment by tfmorris
on 14 Aug 2012 at 8:03
Updated to use the Guava method CharMatcher.WHITESPACE.trimFrom(s) in r2528.
Still needs tests.
Original comment by tfmorris
on 14 Aug 2012 at 8:11
I've added some basic tests. The two characters that the Guava method doesn't
appear to handle are 0-width NBSP "\uFEFF" and Word Join "\u2060". I'm not
going rely on Guava for now rather than trying to work around this.
Original comment by tfmorris
on 14 Aug 2012 at 11:03
Original comment by tfmorris
on 18 Sep 2012 at 3:05
Original issue reported on code.google.com by
palpalpa...@gmail.com
on 14 Aug 2012 at 7:00