Verify that the input is an empty string or contains only whitespace characters.<br>
see {@link Character#isWhitespace(char)}

@param input a string
@return true if input is an empty string or contains only whitespace characters
542041
public static boolean isBlank(String input) {
        int strLen;
        if (input == null || (strLen = input.length()) == 0) {
            return true;
        }
        for (int i = 0; i < strLen; i++) {
            if (!Character.isWhitespace(input.charAt(i))) {
                return false;
            }
        }
        return true;
    }
176513
public static boolean isLetter(String string) {
        boolean result = isNotEmpty(string);
        int idx = 0;
        int len = string.length();
        while (result) {
            if (idx >= len) {
                break;
            }
            result = isLetter(string.charAt(idx));
            idx++;
        }
        return result;
    }
236459
public static Map<Character, Long> charsCount(String input) {
        if (isNullOrEmpty(input)) {
            return Collections.emptyMap();
        }

        return input.chars().mapToObj(c -> (char) c).collect(groupingBy(identity(), counting()));
    }
1248314
protected boolean verifyStringMatch(String text) {
		if (text == null) {
			return false;
		}
		if (!this.caseSensitive) {
			text = text.toLowerCase();
		}
		return text.equals(this.expectedString);
	}
872836
private boolean noInput(Input input) {
		return input.words().isEmpty()
				|| (input.words().size() == 1 && input.words().get(0).trim().isEmpty())
				|| (input.words().iterator().next().matches("\\s*//.*"));
	}
215144
@Override
    public boolean isWhiteSpace()
    {
        final int currToken = mCurrToken;
        if (currToken == CHARACTERS || currToken == CDATA) {
            if (mTokenState < mStTextThreshold) {
                safeFinishToken();
            }
            if (mWsStatus == ALL_WS_UNKNOWN) {
                mWsStatus = mTextBuffer.isAllWhitespace() ?
                    ALL_WS_YES : ALL_WS_NO;
            }
            return mWsStatus == ALL_WS_YES;
        }
        return (currToken == SPACE);
    }
734595
public boolean isWhiteSpace() {
		switch (getEventType()) {
		case XMLStreamConstants.CHARACTERS:
			return this.characters.toString().trim().length() == 0;
		case XMLStreamConstants.CDATA:
			return false;
		case XMLStreamConstants.COMMENT:
			return false;
		case XMLStreamConstants.SPACE:
			return true;
		default:
			return false;
		}
	}
1232599
private static int skipWhitespace(String input, int pos) {
        for (; pos < input.length(); pos++) {
            char c = input.charAt(pos);
            if (c != ' ' && c != '\t') {
                break;
            }
        }
        return pos;
    }
394191
public static boolean isEmail(String s) {
        if (isEmpty(s)) return defaultEmptyOK;

        // is s whitespace?
        if (isWhitespace(s)) return false;

        // there must be >= 1 character before @, so we
        // start looking at character position 1
        // (i.e. second character)
        int i = 1;
        int sLength = s.length();

        // look for @
        while ((i < sLength) && (s.charAt(i) != '@')) i++;

        // there must be at least one character after the .
        if ((i >= sLength - 1) || (s.charAt(i) != '@'))
            return false;
        else
            return true;

        // DEJ 2001-10-13 Don't look for '.', some valid emails do not have a dot in the domain name
        // else i += 2;

        // look for .
        // while((i < sLength) && (s.charAt(i) != '.')) i++;
        // there must be at least one character after the .
        // if((i >= sLength - 1) || (s.charAt(i) != '.')) return false;
        // else return true;
    }
1371080
@Override
    public boolean isValid(Object input) {
        Float d;
        try {
            d = (Float) input;
        } catch (Exception e) {
            return false;
        }

        if (allowNaN && Float.isNaN(d))
            return true;
        if (allowInfinite && Float.isInfinite(d))
            return true;

        if (minAllowedValue != null && d < minAllowedValue)
            return false;
        if (maxAllowedValue != null && d > maxAllowedValue)
            return false;

        return true;
    }
315218
def _check_whitespace(string):
    
    if string.count(' ') + string.count('\t') + string.count('\n') > 0:
        raise ValueError(INSTRUCTION_HAS_WHITESPACE)
670116
public static boolean isWhitespace(int ch) {
		return CHAR_WHITE_SPACE == ch || TAB == ch || LF == ch || CR == ch;
    }
963298
private boolean tryWhitespace() throws SAXException, IOException {
        char c;
        c = readCh();
        if (isWhitespace(c)) {
            skipWhitespace();
            return true;
        } else {
            unread(c);
            return false;
        }
    }
629993
static List<String> split(String input)
    {
        if (input.isEmpty())
            return Collections.<String>emptyList();

        List<String> res = new ArrayList<String>();
        int prev = 0;
        for (int i = 0; i < input.length(); i++)
        {
            if (input.charAt(i) != ':' || (i > 0 && input.charAt(i-1) == '\\'))
                continue;

            res.add(input.substring(prev, i));
            prev = i + 1;
        }
        res.add(input.substring(prev, input.length()));
        return res;
    }
317819
private static String cleanTranslationText(final String input, final boolean removeWhitespaceFromStart,
            final boolean removeWhitespaceFromEnd) {
        String retValue = XMLUtilities.cleanText(input);

        retValue = retValue.trim();

        /*
         * When presenting the contents of a childless XML node to the translator, there is no need for white space padding.
         * When building up a translatable string from a succession of text nodes, whitespace becomes important.
         */
        if (!removeWhitespaceFromStart) {
            if (PRECEEDING_WHITESPACE_SIMPLE_RE_PATTERN.matcher(input).matches()) {
                retValue = " " + retValue;
            }
        }

        if (!removeWhitespaceFromEnd) {
            if (TRAILING_WHITESPACE_SIMPLE_RE_PATTERN.matcher(input).matches()) {
                retValue += " ";
            }
        }

        return retValue;
    }
842537
private boolean isWhitespace(char ch)
    {
        if (linews) 
            return Character.isWhitespace(ch);
        else
            return ch != '\n' && ch != '\r' && Character.isWhitespace(ch);
    }
863233
public static boolean isWhitespace(final char pCharAt) {
      return (pCharAt == '\u0009' || pCharAt == '\n' || pCharAt == '\u000B'
           || pCharAt == '\u000C' || pCharAt == '\r' || pCharAt == '\u001C'
           || pCharAt == '\u001D' || pCharAt == '\u001E' || pCharAt == '\u001F'
           || pCharAt == '\u0020' || pCharAt == '\u1680' || pCharAt == '\u180E'
           || pCharAt == '\u2000' || pCharAt == '\u2001' || pCharAt == '\u2002'
           || pCharAt == '\u2003' || pCharAt == '\u2004' || pCharAt == '\u2005'
           || pCharAt == '\u2006' || pCharAt == '\u2008' || pCharAt == '\u2009'
           || pCharAt == '\u200A' || pCharAt == '\u2028' || pCharAt == '\u2029'
           || pCharAt == '\u205F' || pCharAt == '\u3000');
    }