boolean (final String value) { // Doing the count-down instead of a count-up saves a single int // variable declaration. int i = value.length(); while (--i >= 0) { if (!isXMLWhitespace(value.charAt(i))) { return false; } } return true; }