Java Object NVL NVL(String str, String replace)

Here you can find the source of NVL(String str, String replace)

Description

NVL - fix null value

License

Apache License

Parameter

Parameter Description
String value
replace with

Declaration

public static String NVL(String str, String replace) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    /**/*w  w  w  .  j av  a 2 s  .  c o  m*/
     * NVL - fix null value
     * @param String value
     * @param replace with 
     * @return
     */
    public static String NVL(String str, String replace) {
        if (str == null || str.trim().equals("") || str.trim().toUpperCase().equals("NULL"))
            return replace;
        return str;
    }

    /**
     * NVL - fix null value 
     * @param string value 
     * @return
     */
    public static String NVL(String str) {
        return NVL(str, "");
    }
}

Related

  1. NVL(String s, String valorPorDefecto)
  2. NVL(String source, String def)
  3. nvl(String source, String defaultString)
  4. nvl(String str)
  5. nvl(String str, String nullString)
  6. nvl(String string)
  7. nvl(String value)
  8. nvl(String value, String defaultValue)
  9. NVL(String value, String replace)