Android String Empty Check isEmpty(String input)

Here you can find the source of isEmpty(String input)

Description

is Empty

Declaration

public static boolean isEmpty(String input) 

Method Source Code

//package com.java2s;

public class Main {
    public static boolean isEmpty(String input) {
        if (input == null || "".equals(input) || "null".equals(input))
            return true;

        for (int i = 0; i < input.length(); i++) {
            char c = input.charAt(i);
            if (c != ' ' && c != '\t' && c != '\r' && c != '\n') {
                return false;
            }/*from  w w  w  . ja  v a  2  s .c o m*/
        }
        return true;
    }
}

Related

  1. isEmpty(final String value)
  2. isEmpty(String s)
  3. isEmpty(String value)
  4. isNotEmpty(String value)
  5. isEmptyOrNull(String string)
  6. isNotEmpty(String s)
  7. isEmpty(String string)
  8. isEmptyString(String s)
  9. isEmptyOrNull(String str)