I'm going through StringUtils, doing some doc cleanup. eg adding throws
NullPointerException where a method will, and saying what will happen where
it won't.
I was going to add a note to this method, documenting which definition of
whitespace was being used, when I realised something. The set of characters
that deleteWhitespace cuts from a string doesn't match ANY of Java's
definintions of whitespace.
It will trim
' ' - space
'\t' - horizontal tab
'\r' - carriage return
'\n' - line feed
'\b' - backspace
Backspace isn't a whitespace character. Formfeed, on the other hand, is. And
this is ASCII (ISO-LATIN-1) only, Unicode has a superset definition of
whitespace.
I think the definition should be changed to: (cut and paste from javadoc for
String.isSpace())
'\t' '\u0009' HORIZONTAL TABULATION
'\n' '\u000A' NEW LINE
'\f' '\u000C' FORM FEED
'\r' '\u000D' CARRIAGE RETURN
' ' '\u0020' SPACE
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>