Java Null Value Convert null2Str(String str)

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

Description

null Str

License

MIT License

Declaration

public static String null2Str(String str) 

Method Source Code

//package com.java2s;
/*!/*from w w w .  j  av a 2 s.  c o m*/
 * mifmi-commons4j
 * https://github.com/mifmi/mifmi-commons4j
 *
 * Copyright (c) 2015 mifmi.org and other contributors
 * Released under the MIT license
 * https://opensource.org/licenses/MIT
 */

public class Main {
    public static String null2Str(String str) {
        return null2Str(str, "");
    }

    public static String null2Str(String str, String nullStr) {
        if (str == null) {
            return nullStr;
        }
        return str;
    }
}

Related

  1. null2Int(Object object, int def)
  2. null2Length0(String s)
  3. null2NA(String str)
  4. Null2Space(String str)
  5. null2Str(Object obj)
  6. null2String(Object obj)
  7. null2String(String str)
  8. null2String(String string)
  9. null2void(String str)