Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (defn blank? [string]
- (every? whitespace? string))
- (defn whitespace? [character]
- (Character/isWhitespace character))
- clojure
- vs
- apache commons java implementation
- public static boolean isWhitespace(CharSequence cs) {
- 5371 if (cs == null) {
- 5372 return false;
- 5373 }
- 5374 int sz = cs.length();
- 5375 for (int i = 0; i < sz; i++) {
- 5376 if (Character.isWhitespace(cs.charAt(i)) == false) {
- 5377 return false;
- 5378 }
- 5379 }
- 5380 return true;
- 5381 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement