Advertisement
Guest User

Untitled

a guest
Jun 26th, 2012
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. public class StringUtils {
  2.     public static boolean isBlank(String str) {
  3.         int strLen;
  4.         if (str == null || (strLen = str.length()) == 0) {
  5.             return true;
  6.         }
  7.         for (int i = 0; i < strLen; i++) {
  8.             if ((Character.isWhitespace(str.charAt(i)) == false)) {
  9.                 return false;
  10.             }
  11.         }
  12.         return true;
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement