Android Utililty Methods String Empty Check

List of utility methods to do String Empty Check

Description

The list of methods to do String Empty Check are organized into topic(s).

Method

booleanisNotNull(String str)
is Not Null
return (str != null && !"".equalsIgnoreCase(str.trim()));
StringstringBlank(String s)
string Blank
s = stringNull(s);
if (s == null)
    s = "";
return s;
StringstringNull(String s)
string Null
if (s != null) {
    s = s.trim();
    if (s.equals("") || s.equalsIgnoreCase("null"))
        s = "";
return s;