Android String Empty Check stringBlank(String s)

Here you can find the source of stringBlank(String s)

Description

string Blank

Declaration

public static String stringBlank(String s) 

Method Source Code

//package com.java2s;

public class Main {
    public static String stringBlank(String s) {
        s = stringNull(s);//from ww w  .  j  a  va2s . co  m
        if (s == null)
            s = "";
        return s;
    }

    public static String stringNull(String s) {
        if (s != null) {
            s = s.trim();
            if (s.equals("") || s.equalsIgnoreCase("null"))
                s = "";
        }
        return s;
    }
}

Related

  1. emptyOrNull(String str)
  2. emptyOrNull(String... arrStr)
  3. isBlank(String str)
  4. isEmpty(String input)
  5. isNotNull(String str)
  6. stringNull(String s)