Android String Empty Check stringNull(String s)

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

Description

string Null

Declaration

public static String stringNull(String s) 

Method Source Code

//package com.java2s;

public class Main {
    public static String stringNull(String s) {
        if (s != null) {
            s = s.trim();//ww w  .j a  v a2s.  co m
            if (s.equals("") || s.equalsIgnoreCase("null"))
                s = "";
        }
        return s;
    }
}

Related

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