Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { /** * A checker for whether or not the input value is entirely whitespace. This is slightly more * aggressive than the android TextUtils#isEmpty method, which only returns true for * {@code null} or {@code ""}. * * @param value a possibly blank input string value * @return {@code true} if and only if the value is all whitespace, {@code null}, or empty */ public static boolean isBlank(String value) { return value == null || value.trim().length() == 0; } }