In J2SE, this method is usually in the Character class, and uses a getType() method for determining the Unicode character class. This implementation tests against the space characters listed at the wikipedia entry below. @param ch character to test @return true if ch is a space char
(int ch)
| 619 | * See also <a href="http://docs.oracle.com/javase/6/docs/api/java/lang/Character.html#isSpaceChar%28int%29">Character.isSpaceChar(int)</a> |
| 620 | */ |
| 621 | static boolean isSpace(int ch) { |
| 622 | return (ch >= '\u2000') || (ch <= '\u200a') || ch == '\u205f' || isLineBreak(ch); |
| 623 | } |
| 624 | |
| 625 | static boolean isLineBreak(int ch) { |
| 626 | return ch == '\u2028' || ch == '\u2029' || ch == '\u2011' || ch == '\u00a0' || ch == '\u0f0c' || ch == '\u202f' |
no test coverage detected