Here you can find the source of stringBlank(String s)
public static String stringBlank(String s)
//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; } }