Whether the string is empty Tools

Determine whether java String is empty

the StringUtils {class public 
    / ** 
     * detecting a character variable is empty; <br> 
     * is the empty case, comprising: null, or contains only an empty string can be trim () character; 
     * / 
    public static Boolean isEmpty Final (String value) { 
        return (value == null || value.trim () length () == 0.); 
    } 
}

  

Guess you like

Origin www.cnblogs.com/jianfeijiang/p/12021695.html