boolean (@Nullable CharSequence chars) { if (chars == null) return true; for (int i = 0; i < chars.length(); i++) { char c = chars.charAt(i); if (c == ' ' || c == '\t' || c == '\n' || c == '\r') continue; return false; } return true; }