Returns flag whose value indicates if the string is null, empty or
only contains whitespace characters

@param s a string
@return true if the string is null, empty or only contains whitespace characters
766040
static boolean isEmptyWhitespace(@Nullable final String s) {
        if (s == null) {
            return true;
        }
        return CharMatcher.WHITESPACE.matchesAllOf(s);
    }
214162
private static boolean hasUnsafeChars(String s) {
        for (int i = 0; i < s.length(); ++i) {
            char c = s.charAt(i);
            if (Character.isLetter(c) || c == '.')
                continue;
            else
                return true;
        }
        return false;
    }
1334042
public static boolean hasDoubleQuotes(String s)
    {
        return s != null && s.startsWith("\"") && s.endsWith("\"") && s.length() > 2;
    }
14242
public static boolean isValid(String token)
    {
        if (token == null || token.length() == 0)
        {
            return false;
        }

        int len = token.length();

        for (int i = 0; i < len; ++i)
        {
            if (isSeparator(token.charAt(i)))
            {
                return false;
            }
        }

        return true;
    }
162462
static public String[] parseNameTokens(String stringValue)
  {
    if (stringValue == null)
    {
        return null;
    }

    ArrayList<String> list = new ArrayList<String>(5);

    int     length = stringValue.length();
    boolean inSpace = true;
    int     start = 0;
    for (int i = 0; i < length; i++)
    {
      char ch = stringValue.charAt(i);

      // We're in whitespace;  if we've just departed
      // a run of non-whitespace, append a string.
      // Now, why do we use the supposedly deprecated "Character.isSpace()"
      // function instead of "isWhitespace"?  We're following XML rules
      // here for the meaning of whitespace, which specifically
      // EXCLUDES general Unicode spaces.
      if (Character.isWhitespace(ch))
      {
        if (!inSpace)
        {
          list.add(stringValue.substring(start, i));
          inSpace = true;
        }
      }
      // We're out of whitespace;  if we've just departed
      // a run of whitespace, start keeping track of this string
      else
      {
        if (inSpace)
        {
          start = i;
          inSpace = false;
        }
      }
    }

    if (!inSpace)
    {
        list.add(stringValue.substring(start));
    }

    if (list.isEmpty())
    {
        return null;
    }

    return list.toArray(new String[list.size()]);
  }
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;
    }
394473
private boolean validParameter(final String s) {
        final String[] tokens = PARAMS_REGEX.split(s);
        if (tokens.length != 2) {
            return false;
        }

        final char first = s.charAt(0);
        String second = tokens[1];
        if (second.endsWith(VARARGS_SUFFIX)) {
            // value encoding / return type var args, mangle argument
            second = varargsRoot(second);
        }

        if (first == 'E') {
            if (isWildcard(second)) {
                return true;
            }

            // Verify value encoding exists as an enum
            if (getValueEncoding(second) != null) {
                return true;
            }

            // Fallback to verification based on all character discriminators
            for (final Character c : second.toCharArray()) {
                if (getValueEncoding(c) == null) {
                    return false;
                }
            }
            return true;
        } else if (first == 'F') {
            // Verify return type exists as an enum
            if (ReturnType.getReturnType(second) != null) {
                return true;
            }
        }
        return false;
    }
397963
private boolean isWhitespace(Chars data){
        char chars[] = data.array();
        int end = data.offset()+data.length();
        for(int i=data.offset(); i<end; i++){
            if(!XMLChar.isSpace(chars[i]))
                return false;
        }
        return true;
    }
1344479
private boolean evaluateConditionFlags(String flags) {
        int p = 0;
        while (true) {
            p = skipBlanks(flags, p);
            if (p >= flags.length()) {
                break;
            }
            boolean complement = false;
            if (flags.charAt(p) == '!') {
                complement = true;
                p++;
            }
            p = skipBlanks(flags, p);
            if (p >= flags.length()) {
                break;
            }
            int p0 = p;
            p = skipNonBlanks(flags, p0 + 1);
            String flag = flags.substring(p0, p).toUpperCase();
            if ((conditionFlags != null && conditionFlags.contains(flag)) ^ complement) {
                return true;
            }
        }
        return false;
    }
165835
private static boolean
    isASCIIOkBiDi(CharSequence s, int length) {
        int labelStart=0;
        for(int i=0; i<length; ++i) {
            char c=s.charAt(i);
            if(c=='.') {  // dot
                if(i>labelStart) {
                    c=s.charAt(i-1);
                    if(!('a'<=c && c<='z') && !('0'<=c && c<='9')) {
                        // Last character in the label is not an L or EN.
                        return false;
                    }
                }
                labelStart=i+1;
            } else if(i==labelStart) {
                if(!('a'<=c && c<='z')) {
                    // First character in the label is not an L.
                    return false;
                }
            } else {
                if(c<=0x20 && (c>=0x1c || (9<=c && c<=0xd))) {
                    // Intermediate character in the label is a B, S or WS.
                    return false;
                }
            }
        }
        return true;
    }
1277700
public static boolean isEmpty(@Nullable String str) {
        if (str == null || str.length() == 0) {
            return true;
        }
        return false;
    }
823747
public static void validateString(final String what, final String s) {
    if (s == null) {
      throw new IllegalArgumentException("Invalid " + what + ": null");
    } else if ("".equals(s)) {
      throw new IllegalArgumentException("Invalid " + what + ": empty string");
    }
    final int n = s.length();
    for (int i = 0; i < n; i++) {
      final char c = s.charAt(i);
      if (!(('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') 
          || ('0' <= c && c <= '9') || c == '-' || c == '_' || c == '.' 
          || c == '/' || Character.isLetter(c) || isAllowSpecialChars(c))) {
        throw new IllegalArgumentException("Invalid " + what
            + " (\"" + s + "\"): illegal character: " + c);
      }
    }
  }
175021
public static boolean startWith(@Nullable CharSequence s, char c) {
		if (StringUtils.isEmpty(s)) {
			return false;
		}
		return s.charAt(0) == c;
	}
416707
public static boolean isBlank(@Nullable String string) {
        if (isEmpty(string)) {
            return true;
        }
        for (int i = 0; i < string.length(); i++) {
            if (!Character.isWhitespace(string.charAt(i))) {
                return false;
            }
        }
        return true;
    }
1074270
private static boolean isValidKey(final String s) {
        // Equivalent to this regex \*|[_a-zA-Z](?:[-_a-zA-Z0-9]*[_a-zA-Z0-9]) but faster
        if (s == null) {
            return false;
        }
        if (s.equals(WILDCARD_VALUE)) {
            return true;
        }
        int lastIndex = s.length() - 1;
        if (lastIndex == -1) {
            return false;
        }
        if (!isValidKeyStartCharacter(s.charAt(0))) {
          return false;
        }
        for (int i = 1; i < lastIndex; i++) {
          if (!isValidKeyCharacter(s.charAt(i))) {
            return false;
          }
        }
        if (lastIndex > 0 && !isValidKeyEndCharacter(s.charAt(lastIndex))) {
          return false;
        }
        return true;
      }
945935
protected boolean containsFlag(final char flag, final String flags) {
        if (flags == null) return false;
        return flags.indexOf(flag) >= 0;
    }
1052530
public static boolean isBlank(final String string) {
        if (string == null || string.isEmpty())
            return true;

        return string.chars().allMatch(Character::isWhitespace);
    }