Android String Empty Check isBlank(String str)

Here you can find the source of isBlank(String str)

Description

is Blank

Declaration

public static boolean isBlank(String str) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean isBlank(String str) {
        int strLen;
        if (str == null || (strLen = str.length()) == 0) {
            return true;
        }/*w w w .j  ava2s  .c om*/
        for (int i = 0; i < strLen; i++) {
            if ((Character.isWhitespace(str.charAt(i)) == false)) {
                return false;
            }
        }
        return true;
    }
}

Related

  1. isBlank(String s)
  2. isBlank(String str)
  3. isBlank(EditText editText)
  4. isBlank(String string)
  5. isBlank(String str)
  6. isNotBlank(String str)
  7. isBlank(String text)
  8. isEmpty(String input)
  9. isNullOrEmpty(String str)