Return whether the given string has non whitespace characters.

@param str The string
@return True if is
335374
public static boolean hasText(@Nullable CharSequence str) {
        if (isEmpty(str)) {
            return false;
        }

        int strLen = str.length();
        for (int i = 0; i < strLen; i++) {
            if (!Character.isWhitespace(str.charAt(i))) {
                return true;
            }
        }
        return false;
    }
462982
public static String trimWhitespace(String str) {
        if (!hasLength(str)) {
            return str;
        }
        StringBuilder buf = new StringBuilder(str);
        while (buf.length() > 0 && Character.isWhitespace(buf.charAt(0))) {
            buf.deleteCharAt(0);
        }
        while (buf.length() > 0 && Character.isWhitespace(buf.charAt(buf.length() - 1))) {
            buf.deleteCharAt(buf.length() - 1);
        }
        return buf.toString();
    }
923843
public static boolean isSpaceChar(char c) {
		if (c == 0x20) return true;
		if (c > 0xD) return false;
		if (c < 0x9) return false;
		return isSpace[c - 9];
	}
530510
private static boolean nonASCII(String s) {
    for (int i = 0; i < s.length(); i++) {
      if (s.charAt(i) > 0x7F) {
          return true;
      }
    }
    return false;
  }
922204
boolean isAllUppercase(final String str) {
    for (int i = 0; i < str.length(); i++) {
      char c = str.charAt(i);
      if (Character.isLetter(c) && Character.isLowerCase(c)) {
        return false;
      }
    }
    return true;
  }
1019271
public static boolean isEmpty(String str) {
    return str == null || "".equals(str) || "".equals(str.trim());
  }
960324
public static boolean endsWithStop(String str) {
	if (str.endsWith(".") || str.endsWith("?") || str.endsWith("!")) {
	    return true;
	}
	
	return false;
    }
1110737
public static boolean isBlank(String str) {
		if (str == null) {
			return true;
		}
		int len = str.length();
		if (len == 0) {
			return true;
		}
		for (int i = 0; i < len; i++) {
			switch (str.charAt(i)) {
			case ' ':
			case '\t':
			case '\n':
			case '\r':
			// case '\b':
			// case '\f':
				break;
			default:
				return false;
			}
		}
		return true;
	}
956597
static int findNonWhitespace(String sb, int offset) {
        int result;
        for (result = offset; result < sb.length(); result ++) {
            if (!Character.isWhitespace(sb.charAt(result))) {
                break;
            }
        }
        return result;
    }
552145
static boolean hasFunkyChars(String s) {
        int length = s.length();

        if (length == 0)
            return false;

        for (int i = 0; i < length; ++i) {
            char c = s.charAt(i);

            if (Character.isLetterOrDigit(c) || c == '-' || c == '_')
                continue;
            else
                return true;
        }
        return false;
    }
1180521
public static CharSequence ltrim(CharSequence str)
	{
		int len;
		int i;

		if(str == null || (len = str.length()) <= 0)
			return "";
		for(i=0;i<len;i++)
			if(!Character.isWhitespace(str.charAt(i)))
				break;
		if(i>=len)
			return "";
		return str.subSequence(i, len);
	}
944685
function (str) {
      var strlen = str.length;
      if (this.html.substr(this.currentChar, strlen).toLowerCase() === str.toLowerCase()) {
        this.currentChar += strlen;
        return true;
      }
      return false;
    }
851232
public static boolean isUnicode(String str) {
		if (str == null) {
			return false;
		}
		return (!IDN.toASCII(str).equals(str));
	}
1355863
public static boolean isDelimiter(String str)
    {
        if (str != null && ("-".equals(str) || "－".equals(str)))
            return true;
        else
            return false;
    }
766040
static boolean isEmptyWhitespace(@Nullable final String s) {
        if (s == null) {
            return true;
        }
        return CharMatcher.WHITESPACE.matchesAllOf(s);
    }
927879
public static boolean isToken(String str) {
		// token := 1*<any (US-ASCII) CHAR except SPACE, CTLs, or tspecials>
		// tspecials := "(" / ")" / "<" / ">" / "@" / "," / ";" / ":" / "\" /
		// <"> / "/" / "[" / "]" / "?" / "="
		// CTL := 0.- 31., 127.

		final int length = str.length();
		if (length == 0)
			return false;

		for (int idx = 0; idx < length; idx++) {
			char ch = str.charAt(idx);
			if (!TOKEN_CHARS.get(ch))
				return false;
		}

		return true;
	}
726812
public static String trimAllWhitespace(String str) {
        if (!hasLength(str)) {
            return str;
        }
        StringBuilder buf = new StringBuilder(str);
        int index = 0;
        while (buf.length() > index) {
            if (Character.isWhitespace(buf.charAt(index))) {
                buf.deleteCharAt(index);
            } else {
                index++;
            }
        }
        return buf.toString();
    }